it all works
This commit is contained in:
@@ -40,6 +40,17 @@ public class StructureData {
|
||||
return this.feature.test(rand, this.offsetX, this.offsetZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(obj == this)return true;
|
||||
|
||||
if(obj instanceof StructureData) {
|
||||
return ((StructureData)obj).regionX == this.regionX && ((StructureData)obj).regionZ == this.regionZ;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract static class Feature {
|
||||
public final int salt;
|
||||
public final int templeDistance;
|
||||
@@ -138,4 +149,11 @@ public class StructureData {
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature BURIED_TREASURE = new Feature(10387320, 1) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return rand.nextFloat() < 0.1f;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user