Sign in to follow this
Followers
0

[1.16] Attach Capability to Chunks?
By
kiou.23, in Modder Support
-
Recently Browsing
No registered users viewing this page.
-
Posts
-
By diesieben07 · Posted
Call getCapability. -
I dont understand how i can get them from my class
-
By diesieben07 · Posted
Yes, exactly. -
those handlers ? public <T> net.minecraftforge.common.util.LazyOptional<T> getCapability(net.minecraftforge.common.capabilities.Capability<T> capability, @Nullable Direction facing) { if (this.isAlive() && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { if (facing == null) return handlers[2].cast(); else if (facing.getAxis().isVertical()) return handlers[0].cast(); else if (facing.getAxis().isHorizontal()) return handlers[1].cast(); } return super.getCapability(capability, facing); }
-
By diesieben07 · Posted
No, that is your IItemHandler. You need to look at LivingEntity - it already has these inventories.
-
-
Topics
-
Who's Online (See full list)