Paper: world.getHighestBlock does not work

Created on 1 Feb 2020  路  9Comments  路  Source: PaperMC/Paper

What behaviour is expected:

___What you expected to see___
If i stand under a block and get worlds highest block at the location it returns air.

What behaviour is observed:

___What you actually saw___
I dont know

Steps/models to reproduce:

___This may include a build schematic, a video, or detailed instructions to help reconstruct the issue___
Use a plugin to get the highest block
int x = player.getLocation().clone().getBlockX();
int z = player.getLocation().clone().getBlockZ();
Block block = player.getWorld().getHighestBlockAt(x, z);

    System.out.println(block.getType().toString());

Plugin list:

___A list of your plugins___
TestPlugin.jar

Paper build number:

___This can be found by running /version on your server. latest is not a proper version number; we require the output of /version so we can properly track down the issue.___
This server is running Paper version git-Paper-242 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)

Anything else:

___Anything else you think may help us resolve the problem___

bug bukkit

Most helpful comment

All 9 comments

1.14.4 is unsupported. If you can reproduce on 1.15.2 please let us know.

Did you add api-version to your plugin.yml? Is the block above your location a block added in 1.13+ ?

In 1.15 the same issue. it only works close after a server restart. Api version is set correctly

The block above me is grass_block but it returs air

It gets the highest AIR block but not the highest block.

I can reproduce that in 1.15.2 with Spigot. Blocks where e.g. leaf and grass is the highest block it returns AIR. For poppy and snow it works. Rechecking it against latest build, was 27 behind. Editing it afterwards.
Edit: Can reproduce it with latest. Looks like it returns highest solid non passable block + 1 every time.

Yea it gets the highest block +1

Will be fixed in CB upstream when pr merged.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tazuuuu picture tazuuuu  路  3Comments

BillyGalbreath picture BillyGalbreath  路  3Comments

Marlej-dev picture Marlej-dev  路  3Comments

TNTUP picture TNTUP  路  3Comments

ShelLuser picture ShelLuser  路  3Comments