mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-08 00:36:19 +00:00
Performance
This commit is contained in:
@@ -191,6 +191,7 @@ public class IrisObject extends IrisRegistrant
|
||||
|
||||
public int place(int x, int yv, int z, IObjectPlacer placer, IrisObjectPlacement config, RNG rng, Consumer<BlockPosition> listener)
|
||||
{
|
||||
boolean warped = !config.getWarp().isFlat();
|
||||
boolean stilting = (config.getMode().equals(ObjectPlaceMode.STILT) || config.getMode().equals(ObjectPlaceMode.FAST_STILT));
|
||||
KMap<ChunkPosition, Integer> lowmap = stilting ? new KMap<>() : null;
|
||||
KMap<ChunkPosition, BlockData> lowmapData = stilting ? new KMap<>() : null;
|
||||
@@ -366,6 +367,12 @@ public class IrisObject extends IrisRegistrant
|
||||
int yy = y + (int) Math.round(i.getY());
|
||||
int zz = z + (int) Math.round(i.getZ());
|
||||
|
||||
if(warped)
|
||||
{
|
||||
xx += config.warp(rng, i.getX() + x, i.getY() + y, i.getZ() + z);
|
||||
zz += config.warp(rng, i.getZ() + z, i.getY() + y, i.getX() + x);
|
||||
}
|
||||
|
||||
if(yv < 0 && config.getMode().equals(ObjectPlaceMode.PAINT))
|
||||
{
|
||||
yy = (int) Math.round(i.getY()) + Math.floorDiv(h, 2) + placer.getHighest(xx, zz, config.isUnderwater());
|
||||
|
||||
Reference in New Issue
Block a user