From dfd3b2c5a463c2c3cdfe794e012e3a780bb9ddb4 Mon Sep 17 00:00:00 2001 From: Buuz135 Date: Wed, 22 Dec 2021 12:22:45 +0100 Subject: [PATCH] Made the armory cabinet not a Controllable tile --- .../block/tile/ArmoryCabinetTile.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/buuz135/functionalstorage/block/tile/ArmoryCabinetTile.java b/src/main/java/com/buuz135/functionalstorage/block/tile/ArmoryCabinetTile.java index f715d86..7874e80 100644 --- a/src/main/java/com/buuz135/functionalstorage/block/tile/ArmoryCabinetTile.java +++ b/src/main/java/com/buuz135/functionalstorage/block/tile/ArmoryCabinetTile.java @@ -4,6 +4,7 @@ import com.buuz135.functionalstorage.inventory.ArmoryCabinetInventoryHandler; import com.buuz135.functionalstorage.inventory.CompactingInventoryHandler; import com.hrznstudio.titanium.annotation.Save; import com.hrznstudio.titanium.block.BasicTileBlock; +import com.hrznstudio.titanium.block.tile.ActiveTile; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.level.block.state.BlockState; @@ -16,7 +17,7 @@ import org.jetbrains.annotations.NotNull; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public class ArmoryCabinetTile extends ControllableDrawerTile{ +public class ArmoryCabinetTile extends ActiveTile { //TODO Not sync nbt @@ -44,12 +45,10 @@ public class ArmoryCabinetTile extends ControllableDrawerTile return super.getCapability(cap, side); } - @Override public IItemHandler getStorage() { return handler; } - @Override public LazyOptional getOptional() { return lazyStorage; } @@ -59,4 +58,10 @@ public class ArmoryCabinetTile extends ControllableDrawerTile public ArmoryCabinetTile getSelf() { return this; } + + @Override + public void invalidateCaps() { + super.invalidateCaps(); + getOptional().invalidate(); + } }