Posted November 28, 20186 yr When I try to get the stacks from my inventory capability all are empty. If I open the associated container (extends Container, not IItemHandler) though, and some slots are instantiated and added, the inventory capability with the method getStackInSlot for some reason returns the proper stacks. I havent been able to debug yet what really makes the Slot . Is there something I can do to load the contents of the IItemHandler capability? Iterating through the slots (and getting them) does not work (that returns empty stacks). Is this a somewhat known bug/misuse and (how) can I debug this better? I copied the code from here: https://github.com/Azanor/Baubles Here is the capability code: https://github.com/Azanor/Baubles/tree/master/src/main/java/baubles/api/cap and here the container/slot code: https://github.com/Azanor/Baubles/tree/master/src/main/java/baubles/common/container (it is possible I have missed something when copying and also checking that I didnt forget something later) Many thanks Edited November 28, 20186 yr by dickdanieljr
November 28, 20186 yr 43 minutes ago, dickdanieljr said: When I try to get the stacks from my inventory capability all are empty. Where are you trying to get them at? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
November 28, 20186 yr Author 9 hours ago, Animefan8888 said: Where are you trying to get them at? Hey Animefan8888, thanks for your post. I'm trying to get them at PlayerTickEvent and in a LayerRenderer<EntityPlayer>. Actually it seems the server can get the itemstacks from the IItemHandler just well, but the client doesnt.. (I just realized that now) Edit: Ok I found the error. I forgot to sync 1 little field.. stupid Edited November 28, 20186 yr by dickdanieljr
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.