修复充电站wrapper问题

This commit is contained in:
17146 2024-12-08 22:07:57 +08:00
parent 8c286596eb
commit f7babbaaf6

View file

@ -58,7 +58,7 @@ public class ChargingStationBlockEntity extends BlockEntity implements WorldlyCo
protected NonNullList<ItemStack> items = NonNullList.withSize(2, ItemStack.EMPTY);
private LazyOptional<EnergyStorage> energyHandler;
private LazyOptional<?>[] itemHandlers = SidedInvWrapper.create(this, Direction.NORTH, Direction.DOWN, Direction.NORTH);
private LazyOptional<?>[] itemHandlers = SidedInvWrapper.create(this, Direction.UP, Direction.DOWN, Direction.NORTH);
public int fuelTick = 0;
public int maxFuelTick = DEFAULT_FUEL_TIME;
@ -331,7 +331,7 @@ public class ChargingStationBlockEntity extends BlockEntity implements WorldlyCo
@Override
public void reviveCaps() {
super.reviveCaps();
this.itemHandlers = SidedInvWrapper.create(this, Direction.NORTH, Direction.DOWN, Direction.NORTH);
this.itemHandlers = SidedInvWrapper.create(this, Direction.UP, Direction.DOWN, Direction.NORTH);
this.energyHandler = LazyOptional.of(() -> new EnergyStorage(MAX_ENERGY));
}
}