[SPIGOT-7315] Bed placement duplicates crops if cancelled Created: 24/Mar/23 Updated: 25/Dec/24 Resolved: 07/Apr/23 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Jikoo | Assignee: | Marvin Rieple |
Resolution: | Fixed | Votes: | 0 |
Labels: | Beds, crops, duplication, plugin, spigot |
Attachments: |
![]() |
||||||||
Issue Links: |
|
||||||||
Version: | This server is running CraftBukkit version 3697-Spigot-6ad4b93-9381350 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) | ||||||||
Guidelines Read: | Yes |
Description |
Simple listener for reproduction: @EventHandler(ignoreCancelled = true) private void onMultiPlace(@NotNull BlockMultiPlaceEvent event) { event.setCancelled(true); }
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 https://www.spigotmc.org/resources/beddupefix.105189/ |
Comments |
Comment by Marvin Rieple [ 07/Apr/23 ] |
Made a PR for this: craftbukkit#1168 |