Jump to content

loordgek

Members
  • Posts

    1910
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by loordgek

  1. save the old oldBackpack to nbt and load it in the new one
  2. 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
  3. forge bus is for when the game starts
  4. 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
  5. go and look what assertInventorySize does and A: replicate it using IItemHandler or B: remove it
  6. why do you cast?
  7. 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
  8. is your event method static ?
  9. why do you do then?
  10. 1 does getCapability return a IModItemHandler ? 2 does IModItemHandler extend IItemHandlerModifiable ?
  11. show your container class
  12. in serializeNBT return inventory.serializeNBT and in deserializeNBT call inventory.serializeNBT.deserializeNBT use CompoundNBT as Generic ICapabilitySerializable instead of INBT
  13. yes but you need to save your inventory,instead of ICapabilityProvider implement ICapabilitySerializable
  14. the red box are the coordinates
  15. what do you want to delay
  16. 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
  17. what are you trying to do
  18. no but syncing nbt to the client does have a limit yes
  19. what are you trying to do from a end user perspective
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.