mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-19 07:11:02 +00:00
Fixed stilting with edited data.
This commit is contained in:
@@ -820,13 +820,27 @@ public class IrisObject extends IrisRegistrant {
|
|||||||
i = config.getRotation().rotate(i.clone(), spinx, spiny, spinz).clone();
|
i = config.getRotation().rotate(i.clone(), spinx, spiny, spinz).clone();
|
||||||
i = config.getTranslate().translate(i.clone(), config.getRotation(), 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;
|
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;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
xx = x + (int) Math.round(i.getX());
|
xx = x + (int) Math.round(i.getX());
|
||||||
zz = z + (int) Math.round(i.getZ());
|
zz = z + (int) Math.round(i.getZ());
|
||||||
@@ -838,6 +852,10 @@ public class IrisObject extends IrisRegistrant {
|
|||||||
|
|
||||||
int yg = placer.getHighest(xx, zz, getLoader(), true);
|
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()) {
|
if(yv >= 0 && config.isBottom()) {
|
||||||
y += Math.floorDiv(h, 2);
|
y += Math.floorDiv(h, 2);
|
||||||
}
|
}
|
||||||
@@ -1117,7 +1135,5 @@ public class IrisObject extends IrisRegistrant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void scanForErrors(JSONObject p, VolmitSender sender) {
|
public void scanForErrors(JSONObject p, VolmitSender sender) { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user