loordgek
Members-
Posts
1910 -
Joined
-
Last visited
-
Days Won
7
Everything posted by loordgek
-
save the old oldBackpack to nbt and load it in the new one
-
yes
-
https://github.com/Luis-st/Forge-1.16.5-36.0.1-mdk/blob/main/forge-1.16.5-36.0.1-mdk/src/main/java/net/luis/cave/api/event/ModEventFactory.java you never post the event
-
forge bus is for when the game starts
-
https://github.com/MinecraftForge/MinecraftForge/blob/1.16.x/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java#L93 https://github.com/MinecraftForge/MinecraftForge/blob/1.16.x/src/main/java/net/minecraftforge/event/entity/player/PlayerEvent.java#L135
-
go and look what assertInventorySize does and A: replicate it using IItemHandler or B: remove it
-
where
-
why do you cast?
-
private LazyOptional<CombinedInvWrapper> optional = LazyOptional.of(() -> this will lazy initialized); EnderChestInventory enderChestInventory = player.getInventoryEnderChest(); IItemHandlerModifiable enderChestModifiable = new InvWrapper(enderChestInventory); invWrapper = new CombinedInvWrapper(enderChestModifiable, inventory); return invWrapper; that can be reduced to 1 line
-
is your event method static ?
-
why do you do then?
-
-
1 does getCapability return a IModItemHandler ? 2 does IModItemHandler extend IItemHandlerModifiable ?
-
show your container class
-
in serializeNBT return inventory.serializeNBT and in deserializeNBT call inventory.serializeNBT.deserializeNBT use CompoundNBT as Generic ICapabilitySerializable instead of INBT
-
yes but you need to save your inventory,instead of ICapabilityProvider implement ICapabilitySerializable
-
yes
-
the red box are the coordinates
-
what do you want to delay
-
yes
-
that is never going to work 1 tileB needs to extend tileA 2 change the code you need to change 3 in registerTileEntities register tileB as tileA
-
what are you trying to do
-
no but syncing nbt to the client does have a limit yes
-
what are you trying to do from a end user perspective