From be6739ecb83ea9feb34babac43f947f1cc97375e Mon Sep 17 00:00:00 2001 From: Daniel Mills Date: Fri, 11 Sep 2020 08:05:11 -0400 Subject: [PATCH] Fix spawning (pandas) --- src/main/java/com/volmit/iris/object/IrisEffect.java | 3 +-- .../java/com/volmit/iris/object/IrisEntityInitialSpawn.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/volmit/iris/object/IrisEffect.java b/src/main/java/com/volmit/iris/object/IrisEffect.java index 7fdf5c126..da5b84da5 100644 --- a/src/main/java/com/volmit/iris/object/IrisEffect.java +++ b/src/main/java/com/volmit/iris/object/IrisEffect.java @@ -182,7 +182,6 @@ public class IrisEffect private final transient AtomicCache pt = new AtomicCache<>(); private final transient AtomicCache latch = new AtomicCache<>(); - public boolean canTick() { return latch.aquire(() -> new ChronoLatch(interval)).flip(); @@ -245,7 +244,7 @@ public class IrisEffect { Location part = p.getLocation().clone().add(p.getLocation().getDirection().clone().multiply(RNG.r.i(particleDistance) + particleAway)).clone().add(p.getLocation().getDirection().clone().rotateAroundY(Math.toRadians(90)).multiply(RNG.r.d(-particleDistanceWidth, particleDistanceWidth))); - part.setY(Math.round(g.getTerrainHeight(part.getBlockX(), part.getBlockZ())) + 1); + part.setY(Math.round(g.getCarvedHeight(part.getBlockX(), part.getBlockZ(), true)) + 1); part.add(RNG.r.d(), 0, RNG.r.d()); if(extra != 0) { diff --git a/src/main/java/com/volmit/iris/object/IrisEntityInitialSpawn.java b/src/main/java/com/volmit/iris/object/IrisEntityInitialSpawn.java index edbbd93c6..2cc77dfd7 100644 --- a/src/main/java/com/volmit/iris/object/IrisEntityInitialSpawn.java +++ b/src/main/java/com/volmit/iris/object/IrisEntityInitialSpawn.java @@ -88,6 +88,6 @@ public class IrisEntityInitialSpawn private Entity spawn100(ParallaxTerrainProvider g, Location at) { - return getRealEntity(g).spawn(g, at, rng.aquire(() -> new RNG(g.getTarget().getSeed() + 4))); + return getRealEntity(g).spawn(g, at.clone().add(0, 1, 0), rng.aquire(() -> new RNG(g.getTarget().getSeed() + 4))); } }