it all works

This commit is contained in:
Unknown
2019-11-13 07:22:55 -05:00
parent ed1da66d99
commit 85f9072b9a
14 changed files with 208 additions and 58 deletions
@@ -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;
}
};
}