Slimefun4 icon indicating copy to clipboard operation
Slimefun4 copied to clipboard

Enabling `call-explosion-event` will not drop Slimefun blocks when breaking it using explosive tools.

Open variananora opened this issue 2 years ago โ€ข 4 comments

โ— Checklist

  • [X] I am using the official english version of Slimefun and did not modify the jar.
  • [X] I am using an up to date "DEV" (not "RC") version of Slimefun.
  • [X] I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • [X] I searched for similar open issues and could not find an existing bug report on this.

๐Ÿ“ Description

Enabling call-explosive-event on explosive tools caused only the targeted Slimefun blocks to be dropped and drop nothing on the exploded part. This only happens to Slimefun blocks, vanilla blocks will drop just fine. Also this seems to clear block storage data on that coordinate as well.

๐Ÿ“‘ Reproduction Steps

  1. Enable call-explosive-event on explosive pickaxe
  2. Try to break Slimefun blocks
  3. See it only drops the one you are hitting with it

๐Ÿ’ก Expected Behavior

It should drop all the Slimefun blocks

๐Ÿ“ท Screenshots / Videos

https://youtu.be/OG7TwUCqqzg

๐Ÿ“œ Server Log

No response

๐Ÿ“‚ /error-reports/ folder

No response

๐Ÿ’ป Server Software

Paper

๐ŸŽฎ Minecraft Version

1.19.x

โญ Slimefun version

This Server uses the following setup of Slimefun:
Paper git-Paper-42 (MC: 1.19)
Slimefun DEV - 1015 (git 2c4f886f)
Metrics-Module #28
Java 17

Installed Addons: (2)
  CMILib v1.2.1.0
  CMI v9.2.0.3

๐Ÿงญ Other plugins

Plugins (7): CMI, CMILib, Multiverse-Core, Slimefun, Vault, VoidGen, WorldEdit

variananora avatar Jul 02 '22 03:07 variananora

I spent most of my time debugging this, the returned list from the blockExplodeEvent inside the ExplosiveTool.class are mutated and something is messing with it in the internals, its not giving the expected list given from the constructor of the block explode event and is being mutated after the event is called and doing a call to #blockList() returns only air blocks while the solid blocks are being filtered for a reason I can't really tell why.

FN-FAL113 avatar Aug 05 '22 10:08 FN-FAL113

image an image of the original block list that are intentionally filtered (should also contain air blocks if unfiltered) for debugging versus the block explode event block list which only returns air blocks even though the original block list with the solid blocks destroyed are passed in the constructor of the event

FN-FAL113 avatar Aug 05 '22 10:08 FN-FAL113

Players from my server reported explosive pickaxe is breaking only 1 block and not 3x3 Letme know - if there is something i can do to help. I not use slimefun addons, only master: Slimefun4 - DEV 1047 (git 84008)

comonier avatar Mar 05 '23 05:03 comonier

I'm pretty sure I found the culprit: line 52 of ExplosionsListener.java If you follow the methodcalls it takes you to line 88 and 89 where the blockstorage is cleared (as mentioned in the issue description) and the material is set to AIR (which would explain the debug commented previously) This is also the only BlockExplodeEvent eventhandler Github could find, which further proves my suspicions

iTwins avatar Jul 26 '23 01:07 iTwins