Skip to content

org.bukkit.Location#add / org.bukkit.Location#subtract not having an affect on values. #9870

@PlayfulSeal

Description

@PlayfulSeal

Expected behavior

Location location = ...
Location above = location.add(0, 1, 0);
Location below = location.subtract(0, 1, 0);
is the code that I have. For some reason, location, above and below all return the same values.

Observed/Actual behavior

Results of a Logger.info
Location=Location{world=CraftWorld{name=world},x=-3.0,y=-59.0,z=0.0,pitch=0.0,yaw=0.0}
above=Location{world=CraftWorld{name=world},x=-3.0,y=-59.0,z=0.0,pitch=0.0,yaw=0.0}
below=Location{world=CraftWorld{name=world},x=-3.0,y=-59.0,z=0.0,pitch=0.0,yaw=0.0}

Steps/models to reproduce

Location location = ...
Location above = location.add(0, 1, 0);
Location below = location.subtract(0, 1, 0);

Plugin and Datapack List

None aside from mine.

Paper version

This server is running Paper version git-Paper-246 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: c1ac983) You are running the latest version Previous version: git-Paper-241 (MC: 1.20.2)

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolution: works as intendedWorking as it should / expected totype: bugSomething doesn't work as it was intended to.

    Type

    No fields configured for Bug.

    Projects

    Status

    Invalid

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions