|
Post by tonystrak on Dec 29, 2017 6:00:49 GMT
Hi, I have a ClientChatEvent handler from which I wish to change the world — for starters, just clear a block to air. I have no trouble telling what block the user is looking at, and I can call world.setBlockToAir and it clears the block locallyAnother note about World::isRemote: it checks whether the world is a client-side world. But this is only useful if you don't know the side. But since you just obtained the client world one line earlier, this check is pointless, the world is always going to be client-side (i.e. isRemote is always going to be true). But though I think I understand the concept of sides — and the rule that any world changes need to happen on the logical server — I'm still clueless as to how to actually do that. One post I found here recommended wrapping any state changes in if (!world.isRemote), but when I do that, then world.setBlockToAir simply doesn't get called at all. Thanks! For more details: Pharmaceutical Advertising Video
|
|