Jump to content

Recommended Posts

Posted

Does any one have advise on the best way to change a tile entites item calability based off it's state. For example, if I have a tile entity where it has an item handler capability and if you shift right click on a side of the block it disables the capability from that side. I have been messing around with different ways of achieving this but when I set the blocks state to not give the item capability on a certain side I have to reload the world before the connecting block updates to no longer accept items from that side. I call a block update when I change the state so I was wondering if there is anything I might be missing with the capabilities system around changing a tile entities capability? Thanks.

Posted

Reloading the world sounds like a desync issue... or you're using a global value to set the on/off flags on cap init

And you're not changing the capabilities, you're just denying access when a particular side is 'off'. All you should have to do is return false for hasCapability() and null for getCapability() on the corresponding sides. 

I think its my java of the variables.

Posted

I had changed some code before I posted the question while I was testing so I tried re-implementing my initial code and now its working flawlessly. I couldn't tell you what I'm doing differently. Sorry to bother you and thanks for the advice anyway. If I have any other issues relating to this I'll post my code.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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