1.17.1 Setting player's BoundingBox causes player to burn

Discussion in 'Spigot Plugin Development' started by Armagidon, Jun 16, 2021.

  1. So i'm using the remapped by Mojang NMS version, cuz API is useless for my needs. So I'm having a ticker, and inside of that ticker it runs this piece of code.
    Code (Java):
    @Override
        protected void updateBoundingBox() {
            ((CraftPlayer)getPlayer()).getHandle().setBoundingBox(swimmingBoundingBox);
        }
    But for some reason, when i run it, player simple burns. I looked at the code and nothing seemed strange, so idfk what happens.
    P.s the swimmingBounding box is created using this method
    Code (Java):
    this.swimmingBoundingBox = vanillaPlayer.getLocalBoundsForPose(Pose.STANDING);
    And i checked, no matter what bounding box you shove in it, player burns.
     
  2. The remapping is probably wrong and instead of calling setBoundingBox() (which, as far as I know is not supported anyway), you are calling setOnFire().

    Unless something changed in 1.17, you need to call Player#setSwimming() to change the boundingbox
     
  3. Nah, it does. It's params are taking AABB. I change boundingBox so player could crawl under blocks. Without changing, it does not work.
     
  4. Tau

    Tau

    Have you tried checking for damage events, to see what may be doing it (could be lava if the method is playing up and making it so any nearby lava is burning them)