Everything posted by loordgek
-
[1.16.5] save/transfer of capability
save the old oldBackpack to nbt and load it in the new one
-
[1.16.5] Help with custom Event
yes
-
[1.16.5] Help with custom Event
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
-
[1.16.5] Help with custom Event
forge bus is for when the game starts
-
How Do I Change Vanilla Property Values?
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
-
[1.16.5] Help with Capability (Inventory)
go and look what assertInventorySize does and A: replicate it using IItemHandler or B: remove it
-
[1.16.5] Help with Capability (Inventory)
where
-
[1.16.5] Help with Capability (Inventory)
why do you cast?
-
[1.16.5] Help with Capability (Inventory)
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
-
AttachCapabilityEvent [1.15.2]
is your event method static ?
-
[1.16.5] Help with Capability (Inventory)
why do you do then?
-
[1.16.5] Help with Capability (Inventory)
- [1.16.5] Help with Capability (Inventory)
1 does getCapability return a IModItemHandler ? 2 does IModItemHandler extend IItemHandlerModifiable ?- [1.16.5] Help with Capability (Inventory)
show your container class- [1.16.5] Help with Capability (Inventory)
in serializeNBT return inventory.serializeNBT and in deserializeNBT call inventory.serializeNBT.deserializeNBT use CompoundNBT as Generic ICapabilitySerializable instead of INBT- [1.16.5] Help with Capability (Inventory)
yes but you need to save your inventory,instead of ICapabilityProvider implement ICapabilitySerializable- [1.16.5] Help with Capability (Inventory)
yes- how do i show coordinates?
the red box are the coordinates- how do i show coordinates?
- [1.16.4] Manual tick counter?
what do you want to delay- [1.15] Replacing tile entities
yes- [1.15] Replacing tile entities
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- [1.15] Replacing tile entities
what are you trying to do- [1.16.4] capNBT critical size
no but syncing nbt to the client does have a limit yes- [1.16.4] capNBT critical size
what are you trying to do from a end user perspective - [1.16.5] Help with Capability (Inventory)
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.