Skip to content

Commit

Permalink
fix: remap = false
Browse files Browse the repository at this point in the history
  • Loading branch information
RuochenFu21 committed Dec 18, 2022
1 parent a5ddd79 commit d796d26
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -72,19 +69,6 @@ public void shoot() {
}
}

@Override
public void setRemoved() {
super.setRemoved();
capability.invalidate();
}

@Override
public <T> @NotNull LazyOptional<T> getCapability(@NotNull Capability<T> 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());
Expand Down

0 comments on commit d796d26

Please sign in to comment.