Stop Chain Reactions

Discussion in 'Spigot Plugin Development' started by EmeraldExplorer, Jul 11, 2015.

  1. Is there anyway to stop chain reactions with Spigot/Bukkit api? (or NMS if you tell me the methods to use :p )

    When I say a chain reaction I mean for example having a floating redstone/sign etc. and making sure that if you destroy one, it wont destroy ALL of them. This would be very useful for trying to make sure your server does not lag.

    Also... I might want to do the same thing with TNT lighting other tnt, any ideas?
     
  2. Hm... you could look at the events (BlockBreak, EntityChange (TNT)) and find the cause of the changes. If it's a player, the go ahead. If not, cancel.
     
  3. Be weary that changing the physics around like suggested will undoubtedly have some major side effects. Like, grass not growing, tree leaves not shedding, water not flowing, etc etc.

    The reason you get a chain reaction is because of block physics. When a block updates/changes, it fires physics for itself, any every block that touches it. In redstone mechanics there is an exploit to a bug in these physics, called Bud Switches.

    Be very careful if you are serious about messing around with the physics, cause you can do some pretty nasty things with it without even knowing. ;)