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

Bed explosion checks for DimensionManager#isNatural() instead of DimensionManager#isBedWorks()

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • None
    • OS: Windows 10, also tested on a Debian VPS
      IDE: IntelliJ IDEA Community

      Note: I used BuildTools to get the Spigot source and use breakpoints to find the source of the issue easily

    • CraftBukkit version 3212-Spigot-ff89b97-2cdc6b1 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
    • A test plugin I made
    • Yes

    Description

      I tried using Reflection the set the "C" ("bedWorks" in Mojang mappings) field and the "D" ("respawnAnchorWorks" in Mojang mappings) field of the DimensionManager of my World. Respawn anchor worked as intended but beds didn't change. So I asked for help on the Spigot forums and no real fix to the problem. After that I tried using the Spigot source to find the issue. I found that the bed explosion check was moved to EntityPlayer by CraftBukkit. And it checks for DimensionManager#isNatural(). I checked for usages of this method and it's also used for Piglin spawning at portals in the overworld.

      TL;DR: Bed explosion checks for DimensionManager#isNatural() instead of DimensionManager#isBedWorks() in EntityPlayer#getBedResult(BlockPosition, EnumDirection)

      Attachments

        Activity

          People

            Unassigned Unassigned
            Doclic Doclic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: