mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-04 14:56:28 +00:00
continue work on janky pregenerator
This commit is contained in:
@@ -160,4 +160,9 @@ public class Location implements Cloneable {
|
||||
public Vector3 toVector() {
|
||||
return vector.clone();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "(" + getX() + ", " + getY() + ", " + getZ() + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,8 +152,10 @@ public class MasterChunkGenerator implements TerraChunkGenerator {
|
||||
Palette<BlockData> stairPalette = stairs.get(down.getMaterial());
|
||||
if(stairPalette != null) {
|
||||
BlockData stair = stairPalette.get(0, block.getBlockX(), block.getBlockZ()).clone();
|
||||
Stairs stairNew = (Stairs) stair;
|
||||
if(placeStair(orig, chunk, block, thresh, sampler, stairNew)) return; // Successfully placed part.
|
||||
if(stair instanceof Stairs) {
|
||||
Stairs stairNew = (Stairs) stair;
|
||||
if(placeStair(orig, chunk, block, thresh, sampler, stairNew)) return; // Successfully placed part.
|
||||
}
|
||||
}
|
||||
}
|
||||
BlockData slab = slabs.getOrDefault(down.getMaterial(), blank).get(0, block.getBlockX(), block.getBlockZ());
|
||||
@@ -171,9 +173,11 @@ public class MasterChunkGenerator implements TerraChunkGenerator {
|
||||
Palette<BlockData> stairPalette = stairs.get(up.getMaterial());
|
||||
if(stairPalette != null) {
|
||||
BlockData stair = stairPalette.get(0, block.getBlockX(), block.getBlockZ()).clone();
|
||||
Stairs stairNew = (Stairs) stair.clone();
|
||||
stairNew.setHalf(Bisected.Half.TOP);
|
||||
if(placeStair(orig, chunk, block, thresh, sampler, stairNew)) return; // Successfully placed part.
|
||||
if(stair instanceof Stairs) {
|
||||
Stairs stairNew = (Stairs) stair.clone();
|
||||
stairNew.setHalf(Bisected.Half.TOP);
|
||||
if(placeStair(orig, chunk, block, thresh, sampler, stairNew)) return; // Successfully placed part.
|
||||
}
|
||||
}
|
||||
}
|
||||
BlockData slab = slabs.getOrDefault(up.getMaterial(), blank).get(0, block.getBlockX(), block.getBlockZ()).clone();
|
||||
|
||||
Reference in New Issue
Block a user