[Bug] Biome not able to be fetched from CraftBiome.bukkitToMinecraft() #453
Labels
Status: Pending
Issue/PR is currently awaiting approval by a moderator.
Type: Bug
Something isn't working as intended.
Pre-Issue Checklist
closed ones.
is Terra that is causing the issue.
pack I am using.
latest.log
fileEnvironment
Issue Description
When using the
bukkitToMinecraft(Biome bukkit)
method inCraftBiome
to retrieve the NMS impl of the Biome, it returns null due to the NMS impl not being present in theCraftRegistry.getMinecraftRegistry()
.Steps to reproduce
GenesisMC is the Paper plugin version of the Origins mod, and when running Biome conditions in a biome generated by terra, it fails to retrieve the Biome from the Pair<Biome, BlockPos> for the condition, because the Biome is null.
The NMS Biome and BlockPos Pair is created by this:
new oshi.util.tuples.Pair<Biome, BlockPos>(CraftBiome.bukkitToMinecraft(biome), CraftLocation.toBlockPosition(blockPos)))
The provided "biome" instance is of a
org.bukkit.Biome
which is given byblockPos.getBlock().getBiome()
. The pair gets passed into the Condition tester and then throws null when attempting to access the Pairs "A" value(the biome). The condition being executed is the apoli "temperature" condition and is tested in the code bellow:Line 50(the return statement) is where it throws, which is where it accesses biome.getA().
The github repo of GenesisMC is:
If the issue isnt actually fixable(or needs to be fixed), how can I access the NMS instance of the Biome provided by Terra, or find an alternate way to gain access to those features.
Expected behavior
The Biome should be returned correctly via
CraftBiome.bukkitToMinecraft()
.Actual behavior
Throws a NullPointerException
Full stacktrace
Exception Stacktrace
latest.log
The text was updated successfully, but these errors were encountered: