-
Recently Browsing
No registered users viewing this page.
-
Posts
-
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. -
should this line return me IItemHandler instances for armor and held inventories? return LazyOptional.of(() -> (T) getHandler());
-
-
Topics
-
Who's Online (See full list)