mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-25 21:40:08 +00:00
Fix carving shift blocks
This commit is contained in:
1 parent
1940309954
commit
f86fe4db32
1 file changed
+8
-2
@@ -47,26 +47,32 @@ public class CavePopulator extends BlockPopulator {
|
|||||||
case CENTER:
|
case CENTER:
|
||||||
if(template.getInner().canReplace(m)) {
|
if(template.getInner().canReplace(m)) {
|
||||||
b.setBlockData(template.getInner().get(v.getBlockY()).get(random), false);
|
b.setBlockData(template.getInner().get(v.getBlockY()).get(random), false);
|
||||||
|
if(template.getUpdate().contains(m)) updateNeeded.add(b);
|
||||||
|
if(template.getShift().containsKey(m)) shiftCandidate.put(b.getLocation(), m);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WALL:
|
case WALL:
|
||||||
if(template.getOuter().canReplace(m)) {
|
if(template.getOuter().canReplace(m)) {
|
||||||
b.setBlockData(template.getOuter().get(v.getBlockY()).get(random), false);
|
b.setBlockData(template.getOuter().get(v.getBlockY()).get(random), false);
|
||||||
|
if(template.getUpdate().contains(m)) updateNeeded.add(b);
|
||||||
|
if(template.getShift().containsKey(m)) shiftCandidate.put(b.getLocation(), m);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TOP:
|
case TOP:
|
||||||
if(template.getTop().canReplace(m)) {
|
if(template.getTop().canReplace(m)) {
|
||||||
b.setBlockData(template.getTop().get(v.getBlockY()).get(random), false);
|
b.setBlockData(template.getTop().get(v.getBlockY()).get(random), false);
|
||||||
|
if(template.getUpdate().contains(m)) updateNeeded.add(b);
|
||||||
|
if(template.getShift().containsKey(m)) shiftCandidate.put(b.getLocation(), m);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BOTTOM:
|
case BOTTOM:
|
||||||
if(template.getBottom().canReplace(m)) {
|
if(template.getBottom().canReplace(m)) {
|
||||||
b.setBlockData(template.getBottom().get(v.getBlockY()).get(random), false);
|
b.setBlockData(template.getBottom().get(v.getBlockY()).get(random), false);
|
||||||
|
if(template.getUpdate().contains(m)) updateNeeded.add(b);
|
||||||
|
if(template.getShift().containsKey(m)) shiftCandidate.put(b.getLocation(), m);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(template.getShift().containsKey(b.getType())) shiftCandidate.put(b.getLocation(), b.getType());
|
|
||||||
if(template.getUpdate().contains(m)) updateNeeded.add(b);
|
|
||||||
});
|
});
|
||||||
for(Map.Entry<Location, Material> entry : shiftCandidate.entrySet()) {
|
for(Map.Entry<Location, Material> entry : shiftCandidate.entrySet()) {
|
||||||
Location l = entry.getKey();
|
Location l = entry.getKey();
|
||||||
|
|||||||
Reference in new issue
Block a user