OpenModularTurretsTeam / OpenModularPassiveDefense

GNU General Public License v3.0
2 stars 2 forks source link

Crash When Player is Touching Another Player's Fence #6

Closed Darkosto closed 7 years ago

Darkosto commented 7 years ago

Hello!

It looks like when I use recurrent complex to generate structures uses fences I placed, other players will load up their own world and crash when touching the fence.

Log: https://gist.github.com/rgtexa/6a89909ec89a49744e5786271a994d5c

MC: 1.10.2 Forge: 2221 OMPD: 3.0.0-16 OMLib: 3.0.0-45

Thank you for checking this out! Darkosto

Darkosto commented 7 years ago

And another here: http://pastebin.com/yYdyrpYt

jampot5000 commented 7 years ago

This is caused here https://github.com/OpenModularTurretsTeam/OMLib/blob/1.10.2/src/main/java/omtteam/omlib/util/PlayerUtil.java#L78, from near as I can tell because the client tries to get a list of opped players. This can be fixed by changing the client side config to false as shown below to short circuit the conditional, also this will be a multiplayer issue as it happens whenever someone touches a fence that isn't the owner.

B:"Enable OPs to access all owned blocks."=false

CovertJaguar commented 7 years ago

Can confirm.

Keridos commented 7 years ago

Will be fixed soon.

Keridos commented 7 years ago

Does this still happen with the latest omlib builds from curseforge?

One thing to note: if you use any outside tools to place these blocks, they probably will not be placed correctly. You have to set the owner on them on creating them, since they have tile entities attached to them. If you do not add an owner, it will be null and people will crash on that. So ask the mod authors of the mods you use to copy these to structures, that they should copy the tile entities contents, too. And set the variables the copied tile entities has to the newly created ones.

LemADEC commented 7 years ago

It would much simpler to have a default behavior when 'owner' isn't defined. Or even drop the block on placement is owner wasn't defined. You can expect every single block placement tool to special case your mod unless you go through a standard 'Forge based' behavior.

Keridos commented 7 years ago

Will probably default to dropping the block then.