diff --git a/src/main/java/mekanism/client/render/entity/RenderBalloon.java b/src/main/java/mekanism/client/render/entity/RenderBalloon.java index b2f8571bf..1250ef591 100644 --- a/src/main/java/mekanism/client/render/entity/RenderBalloon.java +++ b/src/main/java/mekanism/client/render/entity/RenderBalloon.java @@ -44,7 +44,7 @@ public class RenderBalloon extends Render y -= RenderManager.renderPosY; z -= RenderManager.renderPosZ; - y += balloon.latchedEntity.height + 1.7F; + y += balloon.getAddedHeight(); } render(((EntityBalloon)entity).color, x, y, z); diff --git a/src/main/java/mekanism/common/entity/EntityBalloon.java b/src/main/java/mekanism/common/entity/EntityBalloon.java index ff0ce20bc..f7ca8a164 100644 --- a/src/main/java/mekanism/common/entity/EntityBalloon.java +++ b/src/main/java/mekanism/common/entity/EntityBalloon.java @@ -1,16 +1,18 @@ package mekanism.common.entity; +import io.netty.buffer.ByteBuf; + import java.util.UUID; import mekanism.api.Coord4D; import mekanism.api.EnumColor; import mekanism.api.Pos3D; - import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.particle.EntityReddustFX; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; @@ -19,8 +21,6 @@ import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import io.netty.buffer.ByteBuf; - public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData { public EnumColor color = EnumColor.DARK_BLUE; @@ -212,9 +212,14 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData latchedEntity.motionY = 0; } - setPosition(latchedEntity.posX, latchedEntity.posY + latchedEntity.height + 1.7F, latchedEntity.posZ); + setPosition(latchedEntity.posX, latchedEntity.posY + getAddedHeight(), latchedEntity.posZ); } } + + public double getAddedHeight() + { + return latchedEntity.height + (latchedEntity instanceof EntityPlayer ? 0F : 1.7F); + } private int getFloor(EntityLivingBase entity) {