updated to 1.15 mappings
This commit is contained in:
@@ -9,11 +9,11 @@ public class StructureData {
|
||||
private int regionZ;
|
||||
private int offsetX;
|
||||
private int offsetZ;
|
||||
private Feature feature;
|
||||
private FeatureType featureType;
|
||||
|
||||
public StructureData(ChunkPos chunkPos, Feature feature) {
|
||||
this.feature = feature;
|
||||
this.feature.build(this, chunkPos);
|
||||
public StructureData(ChunkPos chunkPos, FeatureType featureType) {
|
||||
this.featureType = featureType;
|
||||
this.featureType.build(this, chunkPos);
|
||||
}
|
||||
|
||||
public int getRegionX() {
|
||||
@@ -33,15 +33,15 @@ public class StructureData {
|
||||
}
|
||||
|
||||
public int getSalt() {
|
||||
return this.feature.salt;
|
||||
return this.featureType.salt;
|
||||
}
|
||||
|
||||
public Feature getFeature() {
|
||||
return this.feature;
|
||||
public FeatureType getFeatureType() {
|
||||
return this.featureType;
|
||||
}
|
||||
|
||||
public boolean test(ChunkRandom rand) {
|
||||
return this.feature.test(rand, this.offsetX, this.offsetZ);
|
||||
return this.featureType.test(rand, this.offsetX, this.offsetZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -50,17 +50,17 @@ public class StructureData {
|
||||
|
||||
if(obj instanceof StructureData) {
|
||||
StructureData structureData = ((StructureData)obj);
|
||||
return structureData.regionX == this.regionX && structureData.regionZ == this.regionZ && structureData.feature == this.feature;
|
||||
return structureData.regionX == this.regionX && structureData.regionZ == this.regionZ && structureData.featureType == this.featureType;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract static class Feature {
|
||||
public abstract static class FeatureType {
|
||||
public final int salt;
|
||||
public final int distance;
|
||||
|
||||
public Feature(int salt, int distance) {
|
||||
public FeatureType(int salt, int distance) {
|
||||
this.salt = salt;
|
||||
this.distance = distance;
|
||||
}
|
||||
@@ -89,56 +89,56 @@ public class StructureData {
|
||||
public abstract boolean test(ChunkRandom rand, int x, int z);
|
||||
}
|
||||
|
||||
public static final Feature DESERT_PYRAMID = new Feature(14357617, 32) {
|
||||
public static final FeatureType DESERT_PYRAMID = new FeatureType(14357617, 32) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return rand.nextInt(24) == x && rand.nextInt(24) == z;
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature IGLOO = new Feature(14357618, 32) {
|
||||
public static final FeatureType IGLOO = new FeatureType(14357618, 32) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return rand.nextInt(24) == x && rand.nextInt(24) == z;
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature JUNGLE_TEMPLE = new Feature(14357619, 32) {
|
||||
public static final FeatureType JUNGLE_TEMPLE = new FeatureType(14357619, 32) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return rand.nextInt(24) == x && rand.nextInt(24) == z;
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature SWAMP_HUT = new Feature(14357620, 32) {
|
||||
public static final FeatureType SWAMP_HUT = new FeatureType(14357620, 32) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return rand.nextInt(24) == x && rand.nextInt(24) == z;
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature OCEAN_RUIN = new Feature(14357621, 16) {
|
||||
public static final FeatureType OCEAN_RUIN = new FeatureType(14357621, 16) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return rand.nextInt(8) == x && rand.nextInt(8) == z;
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature SHIPWRECK = new Feature(165745295, 16) {
|
||||
public static final FeatureType SHIPWRECK = new FeatureType(165745295, 16) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return rand.nextInt(8) == x && rand.nextInt(8) == z;
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature PILLAGER_OUTPOST = new Feature(165745296, 32) {
|
||||
public static final FeatureType PILLAGER_OUTPOST = new FeatureType(165745296, 32) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return rand.nextInt(24) == x && rand.nextInt(24) == z;
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature END_CITY = new Feature(10387313, 20) {
|
||||
public static final FeatureType END_CITY = new FeatureType(10387313, 20) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return (rand.nextInt(9) + rand.nextInt(9)) / 2 == x
|
||||
@@ -146,7 +146,7 @@ public class StructureData {
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature OCEAN_MONUMENT = new Feature(10387313, 32) {
|
||||
public static final FeatureType OCEAN_MONUMENT = new FeatureType(10387313, 32) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return (rand.nextInt(27) + rand.nextInt(27)) / 2 == x
|
||||
@@ -154,14 +154,14 @@ public class StructureData {
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature BURIED_TREASURE = new Feature(10387320, 1) {
|
||||
public static final FeatureType BURIED_TREASURE = new FeatureType(10387320, 1) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return rand.nextFloat() < 0.1f;
|
||||
return rand.nextFloat() < 0.01f;
|
||||
}
|
||||
};
|
||||
|
||||
public static final Feature WOODLAND_MANSION = new Feature(10387319, 80) {
|
||||
public static final FeatureType WOODLAND_MANSION = new FeatureType(10387319, 80) {
|
||||
@Override
|
||||
public boolean test(ChunkRandom rand, int x, int z) {
|
||||
return (rand.nextInt(60) + rand.nextInt(60)) / 2 == x
|
||||
|
||||
Reference in New Issue
Block a user