mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Committed the other files I meant to commit.
This commit is contained in:
1 parent
d6cf9a8e90
commit
fef1fb6fb6
2 files changed
+38
-7
No files matched your search
@@ -7,17 +7,16 @@ import java.util.Set;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Pos3D;
|
||||
import mekanism.client.render.particle.EntityJetpackFlameFX;
|
||||
import mekanism.client.render.particle.EntityJetpackSmokeFX;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.item.ItemJetpack;
|
||||
import mekanism.common.item.ItemScubaTank;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiChat;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.particle.EntityFlameFX;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -40,7 +39,7 @@ public class RenderTickHandler
|
||||
{
|
||||
if(event.phase == Phase.END)
|
||||
{
|
||||
if(mc.thePlayer != null && mc.theWorld != null)
|
||||
if(mc.thePlayer != null && mc.theWorld != null && !mc.isGamePaused())
|
||||
{
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
World world = mc.thePlayer.worldObj;
|
||||
@@ -77,7 +76,7 @@ public class RenderTickHandler
|
||||
}
|
||||
}
|
||||
|
||||
if(player != null && !(mc.currentScreen instanceof GuiChat) && player.getEquipmentInSlot(3) != null)
|
||||
if(player != null && mc.currentScreen == null && player.getEquipmentInSlot(3) != null)
|
||||
{
|
||||
ItemStack stack = player.getEquipmentInSlot(3);
|
||||
|
||||
@@ -173,11 +172,11 @@ public class RenderTickHandler
|
||||
|
||||
if(s.equals("flame"))
|
||||
{
|
||||
fx = new EntityFlameFX(world, x, y, z, velX, velY, velZ);
|
||||
fx = new EntityJetpackFlameFX(world, x, y, z, velX, velY, velZ);
|
||||
}
|
||||
else if(s.equals("smoke"))
|
||||
{
|
||||
fx = new EntitySmokeFX(world, x, y, z, velX, velY, velZ);
|
||||
fx = new EntityJetpackSmokeFX(world, x, y, z, velX, velY, velZ);
|
||||
}
|
||||
|
||||
mc.effectRenderer.addEffect(fx);
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package mekanism.client.render.particle;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntitySmokeFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class EntityJetpackSmokeFX extends EntitySmokeFX {
|
||||
|
||||
private static Minecraft mc = FMLClientHandler.instance().getClient();
|
||||
|
||||
public EntityJetpackSmokeFX(World world, double posX, double posY, double posZ, double velX, double velY, double velZ) {
|
||||
super(world, posX, posY, posZ, velX, velY, velZ);
|
||||
this.noClip = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBrightnessForRender(float p_70013_1_) {
|
||||
return 190 + (int) (20F * (1.0F - mc.gameSettings.gammaSetting));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator p_70539_1_, float p_70539_2_, float p_70539_3_, float p_70539_4_, float p_70539_5_, float p_70539_6_, float p_70539_7_) {
|
||||
if (this.particleAge > 0)
|
||||
super.renderParticle(p_70539_1_, p_70539_2_, p_70539_3_, p_70539_4_, p_70539_5_, p_70539_6_, p_70539_7_);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user