churchnomad.blogg.se

The mutant creatures mod 1.6.4
The mutant creatures mod 1.6.4







the mutant creatures mod 1.6.4

There were no crashes and on occasion, it works for a few seconds with some exceptions. I recently logged on to minecraft forge 1.7.10, which constantly gives me problems, and I ran into a problem that I simply couldn't solve. This way it would also be possible to forcefully updating the BlockEntity by calling the method wrapped in the check, which is exactly what I'd need to.

the mutant creatures mod 1.6.4

Ideally it would be nice to have all the logic that actually updates the BlockEntity in a separated static method and then having BlockItem#updateCustomBlockEntityTag (the static one) call it if level#getServer() != null (and return false otherwise). Is there no better way of doing this other than copy-pasting the logic from BlockItem#updateCustomBlockEntityTag (the static one).

#THE MUTANT CREATURES MOD 1.6.4 UPDATE#

Will it actually create some kind of problem because I'm updating my BlockEntity also client side (and if it doesn't create problems, why does it update only server side by default?) It works and doesn't seem to be creating any problems, however I'm wondering if My solution is to override BlockItem#updateCustomBlockEntityTag (not the static one) and if BlockItem#updateCustomBlockEntityTag (the static one) returns false, then I check if it was because level#getServer() returned null and if so I do the same BlockItem#updateCustomBlockEntityTag (the static one) would do if level#getServer() did not return null. Indeed in multiplayer others would actually hear the correct sound (BlockEntity is updated, sound can be retrieved, level is server side, level#playSound will play it for anyone but the player), it's only the player placing the block that would not hear the correct sound (BlockEntity is not updated, sound defaults to Stone, level is client side, level#playSound will play it for the player only). This is a problem because when it gets called client side it doesn't update the entity tag and so my BlockEntity doesn't have a referringBlockState. In BlockItem#updateCustomBlockEntityTag the entity tag is updated only if level.getServer() != null.









The mutant creatures mod 1.6.4