diff --git a/src/main/java/com/minelittlepony/unicopia/entity/SombraEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/SombraEntity.java index 22bea48d..5184085c 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/SombraEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/SombraEntity.java @@ -72,6 +72,7 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.world.GameRules; import net.minecraft.world.World; import net.minecraft.world.WorldEvents; +import net.minecraft.world.Heightmap.Type; import net.minecraft.world.event.GameEvent; public class SombraEntity extends HostileEntity implements ArenaCombatant, ParticleSource { @@ -219,7 +220,7 @@ public class SombraEntity extends HostileEntity implements ArenaCombatant, Parti Optional homePos = getHomePos(); if (homePos.isEmpty() && !isRemoved()) { - setHomePos(getBlockPos()); + setHomePos(getWorld().getTopPosition(Type.MOTION_BLOCKING_NO_LEAVES, getBlockPos())); homePos = getHomePos(); } @@ -242,10 +243,9 @@ public class SombraEntity extends HostileEntity implements ArenaCombatant, Parti setPositionTarget(homePos.get(), (int)getAreaRadius()); } - setVelocity(Vec3d.ZERO); super.tick(); - if (getTarget() == null && getVelocity().y < 0) { + if (getTarget() == null && getVelocity().y < -0.1F) { setVelocity(getVelocity().multiply(1, 0.4, 1)); } @@ -285,7 +285,7 @@ public class SombraEntity extends HostileEntity implements ArenaCombatant, Parti } if (getTarget() == null && getNavigation().isIdle()) { - getNavigation().startMovingTo(homePos.get().getX(), homePos.get().getY() + 10, homePos.get().getZ(), 2); + getNavigation().startMovingTo(homePos.get().getX(), homePos.get().getY() + 5, homePos.get().getZ(), 2); } } diff --git a/src/main/java/com/minelittlepony/unicopia/entity/StormCloudEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/StormCloudEntity.java index 45b440c2..59820215 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/StormCloudEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/StormCloudEntity.java @@ -336,6 +336,8 @@ public class StormCloudEntity extends Entity { nbt.putInt("clearTicks", getClearTicks()); nbt.putFloat("size", getSize(1)); nbt.putBoolean("cursed", cursed); + nbt.putInt("phase", phase); + nbt.putInt("nextPhase", nextPhase); } @Override @@ -344,6 +346,8 @@ public class StormCloudEntity extends Entity { setClearTicks(nbt.getInt("clearTicks")); setSize(currentSize = nbt.getFloat("size")); cursed = nbt.getBoolean("cursed"); + phase = nbt.getInt("phase"); + nextPhase = nbt.getInt("nextPhase"); } @Override