diff --git a/common/mekanism/client/render/entity/RenderBalloon.java b/common/mekanism/client/render/entity/RenderBalloon.java index c60c32b22..c0ecfc6d9 100644 --- a/common/mekanism/client/render/entity/RenderBalloon.java +++ b/common/mekanism/client/render/entity/RenderBalloon.java @@ -44,7 +44,7 @@ public class RenderBalloon extends Render y -= RenderManager.renderPosY; z -= RenderManager.renderPosZ; - y += 3; + y += (balloon.latchedEntity.height/2) + 2.2F; } render(((EntityBalloon)entity).color, x, y, z); diff --git a/common/mekanism/client/render/entity/RenderRobit.java b/common/mekanism/client/render/entity/RenderRobit.java index 65600115a..1f19c22fc 100644 --- a/common/mekanism/client/render/entity/RenderRobit.java +++ b/common/mekanism/client/render/entity/RenderRobit.java @@ -5,6 +5,7 @@ import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.ResourceLocation; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; diff --git a/common/mekanism/common/entity/EntityBalloon.java b/common/mekanism/common/entity/EntityBalloon.java index 6b76aca9c..08bdd5b8c 100644 --- a/common/mekanism/common/entity/EntityBalloon.java +++ b/common/mekanism/common/entity/EntityBalloon.java @@ -68,7 +68,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData this(entity.worldObj); latchedEntity = entity; - setPosition(latchedEntity.posX, latchedEntity.posY + 3F, latchedEntity.posZ); + setPosition(latchedEntity.posX, latchedEntity.posY + (latchedEntity.height/2) + 2.2F, latchedEntity.posZ); prevPosX = posX; prevPosY = posY; @@ -198,7 +198,20 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData else if(latchedEntity != null && latchedEntity.getHealth() > 0) { int floor = getFloor(latchedEntity); - setPosition(posX = latchedEntity.posX, posY = latchedEntity.posY + 3F, posZ = latchedEntity.posZ); + + if(latchedEntity.posY-(floor+1) < -0.1) + { + latchedEntity.motionY = Math.max(0.04, latchedEntity.motionY*1.015); + } + else if(latchedEntity.posY-(floor+1) > 0.1) + { + latchedEntity.motionY = Math.min(-0.04, latchedEntity.motionY*1.015); + } + else { + latchedEntity.motionY = 0; + } + + setPosition(latchedEntity.posX, latchedEntity.posY + (latchedEntity.height/2) + 2.2F, latchedEntity.posZ); } } @@ -210,9 +223,9 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData for(int i = yPos; i > 0; i--) { - if(!worldObj.isAirBlock(xPos, i, zPos)) + if(i < 256 && !worldObj.isAirBlock(xPos, i, zPos)) { - return i; + return i+1; } } diff --git a/common/mekanism/common/entity/EntityRobit.java b/common/mekanism/common/entity/EntityRobit.java index 1fe9ba2d8..4872a5103 100644 --- a/common/mekanism/common/entity/EntityRobit.java +++ b/common/mekanism/common/entity/EntityRobit.java @@ -55,10 +55,10 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine { super(world); - setSize(0.5F, 0.5F); + setSize(0.3F, 0.3F); getNavigator().setAvoidsWater(true); - + tasks.addTask(1, new RobitAIPickup(this, 1.0F)); tasks.addTask(2, new RobitAIFollow(this, 1.0F, 10.0F, 2.0F)); tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));