Skip to content

Commit

Permalink
Another backwards compat change
Browse files Browse the repository at this point in the history
Plethora only implements getPos on older versions, so we need to stub
out both.
  • Loading branch information
SquidDev committed Jan 21, 2019
1 parent d5aea26 commit d173787
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ public void update()

public abstract World getWorld();

public abstract Vec3d getPosition();
public Vec3d getPosition()
{
// FIXME: Should be abstract, but we need this for Plethora compat. We'll
// be able to change this in a few versions as we implement both there.
@SuppressWarnings( "deprecation" ) BlockPos pos = getPos();
return new Vec3d( pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5 );
}

@Deprecated
public BlockPos getPos()
Expand Down

0 comments on commit d173787

Please sign in to comment.