mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:38:34 +00:00
*
haven't done one of these in a while *continuing with merge in previous commit
This commit is contained in:
@ -27,11 +27,16 @@ import com.sk89q.worldedit.registry.NamespacedRegistry;
|
||||
public class BiomeType {
|
||||
|
||||
public static final NamespacedRegistry<BiomeType> REGISTRY = new NamespacedRegistry<>("biome type");
|
||||
private final int internalId;
|
||||
private final String id;
|
||||
|
||||
private String id;
|
||||
|
||||
public BiomeType(String id) {
|
||||
protected BiomeType(String id, int internalId) {
|
||||
this.id = id;
|
||||
this.internalId = internalId;
|
||||
}
|
||||
|
||||
public int getInternalId() {
|
||||
return internalId;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -50,7 +55,7 @@ public class BiomeType {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.id.hashCode();
|
||||
return this.internalId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -103,8 +103,11 @@ public class BiomeTypes {
|
||||
private BiomeTypes() {
|
||||
}
|
||||
|
||||
private static int index = 0;
|
||||
|
||||
private static BiomeType register(final String id) {
|
||||
return register(new BiomeType(id));
|
||||
// TODO implement registry
|
||||
return register(new BiomeType(id, index++));
|
||||
}
|
||||
|
||||
public static BiomeType register(final BiomeType biome) {
|
||||
|
Reference in New Issue
Block a user