Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7315

Bed placement duplicates crops if cancelled


    • 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) {
      1. Create an enclosed farming plot to block sky light - underground, in a house, etc.
      2. Plant crops
      3. Remove all light sources
      4. Attempt to place a bed adjacent to a crop
      5. 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:




            DerFrZocker Marvin Rieple
            Jikoo Jikoo
            0 Vote for this issue
            3 Start watching this issue