Fix spawning (pandas)

This commit is contained in:
Daniel Mills
2020-09-11 08:05:11 -04:00
parent 200e576ba8
commit be6739ecb8
2 changed files with 2 additions and 3 deletions
@@ -182,7 +182,6 @@ public class IrisEffect
private final transient AtomicCache<PotionEffectType> pt = new AtomicCache<>(); private final transient AtomicCache<PotionEffectType> pt = new AtomicCache<>();
private final transient AtomicCache<ChronoLatch> latch = new AtomicCache<>(); private final transient AtomicCache<ChronoLatch> latch = new AtomicCache<>();
public boolean canTick() public boolean canTick()
{ {
return latch.aquire(() -> new ChronoLatch(interval)).flip(); 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))); 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()); part.add(RNG.r.d(), 0, RNG.r.d());
if(extra != 0) if(extra != 0)
{ {
@@ -88,6 +88,6 @@ public class IrisEntityInitialSpawn
private Entity spawn100(ParallaxTerrainProvider g, Location at) 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)));
} }
} }