diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java index 8ccf91c59..32e5d0f2d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -55,7 +54,6 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy return null; } - // TODO: [port] this might not be a stable way of doing this. @Override public IItemHandler getItemHandler(Direction facing) { Player player = this.getPlayer(); @@ -66,6 +64,8 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy this.playerHandler = player == null ? null : new PlayerInvWrapper(player.getInventory()); + + this.invalidateCapabilities(); } return this.playerHandler; @@ -90,7 +90,7 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy for (int i = 0; i < player.getInventory().getContainerSize(); i++) { if (tile.storage.getEnergyStored() > 0) { ItemStack slot = player.getInventory().getItem(i); - if (StackUtil.isValid(slot) && slot.getCount() == 1) { + if (!slot.isEmpty() && slot.getCount() == 1) { int received = Optional.ofNullable(slot.getCapability(Capabilities.EnergyStorage.ITEM)) .map(cap -> cap.receiveEnergy(tile.storage.getEnergyStored(), false)).orElse(0); diff --git a/src/main/resources/assets/actuallyadditions/lang/en_us.json b/src/main/resources/assets/actuallyadditions/lang/en_us.json index 0d7eb13b9..292acd235 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_us.json +++ b/src/main/resources/assets/actuallyadditions/lang/en_us.json @@ -173,9 +173,9 @@ "block.actuallyadditions.leaf_generator": "Leaf-Eating Generator", "block.actuallyadditions.long_range_breaker": "Long-Range Breaker", "block.actuallyadditions.ranged_collector": "Ranged Collector", - "block.actuallyadditions.laser_relay": "Energy Laser Relay (wip)", - "block.actuallyadditions.laser_relay_advanced": "Advanced Energy Laser Relay (wip)", - "block.actuallyadditions.laser_relay_extreme": "Extreme Energy Laser Relay (wip)", + "block.actuallyadditions.laser_relay": "Energy Laser Relay", + "block.actuallyadditions.laser_relay_advanced": "Advanced Energy Laser Relay", + "block.actuallyadditions.laser_relay_extreme": "Extreme Energy Laser Relay", "block.actuallyadditions.laser_relay_fluids": "Fluid Laser Relay (wip)", "block.actuallyadditions.iron_casing": "Iron Casing", "block.actuallyadditions.black_lotus": "Black Lotus",