9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-25 10:09:14 +00:00

Fixed stilting with edited data.

This commit is contained in:
Vatuu
2022-05-16 17:49:49 +02:00
parent ccc2ed0806
commit 5a4ca2f907

View File

@@ -820,13 +820,27 @@ public class IrisObject extends IrisRegistrant {
i = config.getRotation().rotate(i.clone(), spinx, spiny, spinz).clone();
i = config.getTranslate().translate(i.clone(), config.getRotation(), spinx, spiny, spinz).clone();
if(i.getBlockY() != lowest) {
if(i.getBlockY() != lowest)
continue;
for(IrisObjectReplace j : config.getEdit()) {
if(rng.chance(j.getChance())) {
for(BlockData k : j.getFind(rdata)) {
if(j.isExact() ? k.matches(d) : k.getMaterial().equals(d.getMaterial())) {
BlockData newData = j.getReplace(rng, i.getX() + x, i.getY() + y, i.getZ() + z, rdata).clone();
if(newData.getMaterial() == d.getMaterial()) {
d = d.merge(newData);
} else {
d = newData;
}
}
}
}
}
if(d == null || B.isAir(d)) {
if(d == null || B.isAir(d))
continue;
}
xx = x + (int) Math.round(i.getX());
zz = z + (int) Math.round(i.getZ());
@@ -838,6 +852,10 @@ public class IrisObject extends IrisRegistrant {
int yg = placer.getHighest(xx, zz, getLoader(), true);
if(config.isWaterloggable() && yg <= placer.getFluidHeight() && d instanceof Waterlogged) {
((Waterlogged) d).setWaterlogged(true);
}
if(yv >= 0 && config.isBottom()) {
y += Math.floorDiv(h, 2);
}
@@ -1117,7 +1135,5 @@ public class IrisObject extends IrisRegistrant {
}
@Override
public void scanForErrors(JSONObject p, VolmitSender sender) {
}
public void scanForErrors(JSONObject p, VolmitSender sender) { }
}