From 54a10af2d72f3a38fc655d242f6f7b5e7db94ec6 Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Mon, 9 Dec 2013 17:00:08 -0500 Subject: [PATCH] A few tiny fixes --- common/mekanism/client/ClientTickHandler.java | 10 ++++++++++ .../mekanism/client/render/RenderTickHandler.java | 14 +++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/common/mekanism/client/ClientTickHandler.java b/common/mekanism/client/ClientTickHandler.java index 33b4dcf5c..ce66f098d 100644 --- a/common/mekanism/client/ClientTickHandler.java +++ b/common/mekanism/client/ClientTickHandler.java @@ -372,6 +372,11 @@ public class ClientTickHandler implements ITickHandler public static boolean isJetpackOn(EntityPlayer player) { + if(player != mc.thePlayer) + { + return Mekanism.jetpackOn.contains(player); + } + ItemStack stack = player.inventory.armorInventory[2]; if(stack != null) @@ -399,6 +404,11 @@ public class ClientTickHandler implements ITickHandler public static boolean isGasMaskOn(EntityPlayer player) { + if(player != mc.thePlayer) + { + return Mekanism.gasmaskOn.contains(player); + } + ItemStack tank = player.inventory.armorInventory[2]; ItemStack mask = player.inventory.armorInventory[3]; diff --git a/common/mekanism/client/render/RenderTickHandler.java b/common/mekanism/client/render/RenderTickHandler.java index 0c9455269..c21aca882 100644 --- a/common/mekanism/client/render/RenderTickHandler.java +++ b/common/mekanism/client/render/RenderTickHandler.java @@ -9,6 +9,7 @@ import mekanism.common.Mekanism; import mekanism.common.item.ItemJetpack; import mekanism.common.item.ItemScubaTank; import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.ScaledResolution; @@ -108,6 +109,13 @@ public class RenderTickHandler implements ITickHandler continue; } + Vector3 playerPos = new Vector3(p); + + if(p != mc.thePlayer) + { + playerPos.translate(new Vector3(0, 1.7, 0)); + } + float random = (rand.nextFloat()-0.5F)*0.1F; Vector3 vLeft = new Vector3(); @@ -138,15 +146,15 @@ public class RenderTickHandler implements ITickHandler mLeft.translate(rLeft); mRight.translate(rRight); - Vector3 v = new Vector3(p).translate(vLeft); + Vector3 v = new Vector3(playerPos).translate(vLeft); spawnAndSetParticle("flame", world, v.x, v.y, v.z, mLeft.x, mLeft.y, mLeft.z); spawnAndSetParticle("smoke", world, v.x, v.y, v.z, mLeft.x, mLeft.y, mLeft.z); - v = new Vector3(p).translate(vRight); + v = new Vector3(playerPos).translate(vRight); spawnAndSetParticle("flame", world, v.x, v.y, v.z, mRight.x, mRight.y, mRight.z); spawnAndSetParticle("smoke", world, v.x, v.y, v.z, mRight.x, mRight.y, mRight.z); - v = new Vector3(p).translate(vCenter); + v = new Vector3(playerPos).translate(vCenter); spawnAndSetParticle("flame", world, v.x, v.y, v.z, mCenter.x, mCenter.y, mCenter.z); spawnAndSetParticle("smoke", world, v.x, v.y, v.z, mCenter.x, mCenter.y, mCenter.z); }