From d796d262f8a19bf1f4c83425afd8267b2eefc1c1 Mon Sep 17 00:00:00 2001 From: A_pythoner <62882800+Ruochenfu2011@users.noreply.github.com> Date: Sun, 18 Dec 2022 13:45:22 +0800 Subject: [PATCH] fix: remap = false --- .../StationaryPotatoCannonTileEntity.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/main/java/net/forsteri/createmorepotatoes/tileEntity/stationaryPotatoCannon/StationaryPotatoCannonTileEntity.java b/src/main/java/net/forsteri/createmorepotatoes/tileEntity/stationaryPotatoCannon/StationaryPotatoCannonTileEntity.java index 130dd7a..27bdc14 100644 --- a/src/main/java/net/forsteri/createmorepotatoes/tileEntity/stationaryPotatoCannon/StationaryPotatoCannonTileEntity.java +++ b/src/main/java/net/forsteri/createmorepotatoes/tileEntity/stationaryPotatoCannon/StationaryPotatoCannonTileEntity.java @@ -7,17 +7,14 @@ import net.forsteri.createmorepotatoes.CreateMorePotatoes; import net.forsteri.createmorepotatoes.tileEntity.CannonInventoryHandler; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemStackHandler; -import org.jetbrains.annotations.NotNull; import java.util.Objects; @@ -72,19 +69,6 @@ public void shoot() { } } - @Override - public void setRemoved() { - super.setRemoved(); - capability.invalidate(); - } - - @Override - public @NotNull LazyOptional getCapability(@NotNull Capability cap, Direction side) { - if (isItemHandlerCap(cap)) - return capability.cast(); - return super.getCapability(cap, side); - } - @Override public void write(CompoundTag compound, boolean clientPacket) { compound.put("item", inventory.serializeNBT());