mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-16 04:11:39 +01:00
Fixes minor bug in the biome implementation. (#1999)
The registry method was never implemented correctly and always returns a null reference. This commit solves the problem and will return an object in some cases in the future.
This commit is contained in:
parent
fe46ed4ac2
commit
ffb33e608d
@ -27,6 +27,7 @@ final class BiomeImpl implements ProtocolObject, Biome {
|
||||
return CONTAINER.getSafe(namespace);
|
||||
}
|
||||
|
||||
private Registry.BiomeEntry entry;
|
||||
@NotNull
|
||||
private final NamespaceID name;
|
||||
private final float depth;
|
||||
@ -52,6 +53,7 @@ final class BiomeImpl implements ProtocolObject, Biome {
|
||||
}
|
||||
|
||||
BiomeImpl(Registry.BiomeEntry entry) {
|
||||
this.entry = entry;
|
||||
this.name = entry.namespace();
|
||||
this.depth = 0.2f;
|
||||
this.scale = 0.2f;
|
||||
@ -85,7 +87,7 @@ final class BiomeImpl implements ProtocolObject, Biome {
|
||||
@Nullable
|
||||
@Override
|
||||
public Registry.BiomeEntry registry() {
|
||||
return null;
|
||||
return this.entry;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user