-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
This server is running CraftBukkit version 3697-Spigot-6ad4b93-9381350 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT)
-
Yes
Simple listener for reproduction:
@EventHandler(ignoreCancelled = true) private void onMultiPlace(@NotNull BlockMultiPlaceEvent event) { event.setCancelled(true); }
- Create an enclosed farming plot to block sky light - underground, in a house, etc.
- Plant crops
- Remove all light sources
- Attempt to place a bed adjacent to a crop
- Cancel BlockMultiPlaceEvent
The crops drop items as if broken in addition to being restored to their previous unbroken state.
Tried to play around with it to see where the issue was. The adjacent crop blocks are already Material.AIR and the corresponding ItemSpawnEvent has been fired by the time the BlockMultiPlaceEvent is fired. The blocks are then reset to crops after the event has been completed and cancelled. Other multi-block items do not appear to be affected, only beds. The crops themselves do not seem to be affected by physics - crops adjacent to the affected one are not affected.
This has apparently been around since 1.16 at least:
https://github.com/TechFortress/GriefPrevention/issues/2027
https://github.com/BG-Software-LLC/SuperiorSkyblock2/issues/1600
- is duplicated by
-
SPIGOT-7329 Cancelling BlockPlaceEvent and placing down bed may cause drops to dupe
- Closed