Flora and ores on Fabric

This commit is contained in:
dfsek
2020-12-14 01:27:28 -07:00
parent 6db4755109
commit 1dded41311
11 changed files with 64 additions and 30 deletions

View File

@@ -298,7 +298,7 @@ public class Vector3 implements Cloneable {
public Vector3 subtract(int x, int y, int z) {
this.x -= x;
this.y -= y;
this.z = -z;
this.z -= z;
return this;
}

View File

@@ -85,7 +85,7 @@ public class CavePopulator implements TerraBlockPopulator {
Location mut = l.clone();
MaterialData orig = handle.getType(l.getBlock());
do mut.subtract(0, 1, 0);
while(handle.getType(mut.getBlock()).equals(orig));
while(mut.getY() > 0 && handle.getType(mut.getBlock()).equals(orig));
try {
if(template.getShift().get(entry.getValue()).contains(mut.getBlock().getType())) {
handle.setBlockData(mut.getBlock(), shiftStorage.computeIfAbsent(entry.getValue(), MaterialData::createBlockData), false);