CobbleSword / NachoSpigot

NachoSpigot is a fork of TacoSpigot 1.8.9 that offers several enhancements to performance as well as bug fixes.
GNU General Public License v3.0
238 stars 89 forks source link

EntityExplodeEvent called twice #230

Closed cokejoke closed 2 years ago

cokejoke commented 2 years ago

If a TNT explodes the EntityExplodeEvent is called twice first with a blockList containing only one AIR block and the second time with the actual blocklist.

    @EventHandler
    public void onEntityExplode(EntityExplodeEvent e) {
        System.out.println(e.blockList());
    }

Produces the following output

[01:56:01] [Server thread/INFO]: [CraftBlock{chunk=CraftChunk{x=-25z=8},x=-389,y=62,z=141,type=AIR,data=0}]
[01:56:01] [Server thread/INFO]: [CraftBlock{chunk=CraftChunk{x=-25z=8},x=-388,y=61,z=138,type=DIRT,data=0}, CraftBlock{chunk=CraftChunk{x=-25z=8},x=-390,y=65,z=143,type=DIRT,data=0}, ...}]

nacho.txt

andreasdc commented 2 years ago

In my case it's firing once. Do you have explosionProtectedRegions enabled?

cokejoke commented 2 years ago

Yes and you can check all my nacho settings in the attached file 'nacho.txt'

sadcenter commented 2 years ago

Found the problem, https://github.com/CobbleSword/NachoSpigot/blob/5ecca27d5de406e4e5ede90465a73ce9e2aaf1fe/NachoSpigot-Server/src/main/java/net/minecraft/server/Explosion.java#L75 so the temp fix is putting optimizeLiquidExplosions in taco.yml to false