mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Fix height placement on structures
This commit is contained in:
parent
858c5a27ad
commit
7933f5e357
@ -114,9 +114,26 @@ public class PlannedStructure {
|
||||
int xx = i.getPosition().getX() + sx;
|
||||
int zz = i.getPosition().getZ() + sz;
|
||||
int offset = i.getPosition().getY() - startHeight;
|
||||
int height = (i.getStructure().getStructure().getLockY() == -1 ? i.getStructure().getStructure().getOverrideYRange() != null
|
||||
? (int)i.getStructure().getStructure().getOverrideYRange().get(rng, xx, zz, getData())
|
||||
: i.getStructure().getStructure().getLockY() : placer.getHighest(xx, zz, getData())) + offset + (v.getH() / 2);
|
||||
int height = 0;
|
||||
|
||||
if(i.getStructure().getStructure().getLockY() == -1)
|
||||
{
|
||||
if(i.getStructure().getStructure().getOverrideYRange() != null)
|
||||
{
|
||||
height = (int)i.getStructure().getStructure().getOverrideYRange().get(rng, xx, zz, getData());
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
height = placer.getHighest(xx, zz, getData());
|
||||
}
|
||||
}
|
||||
|
||||
else{
|
||||
height = i.getStructure().getStructure().getLockY();
|
||||
}
|
||||
|
||||
height += offset + (v.getH() / 2);
|
||||
|
||||
if (options.getMode().equals(ObjectPlaceMode.PAINT) || options.isVacuum()) {
|
||||
height = -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user