mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Merge branch 'development' into 1.8.9
Huge merge with 202 conflicts, hopefully not *too* broken.
This commit is contained in:
commit
84336ec4d1
571 files changed
+10295
-4773
No files matched your search
@@ -9,6 +9,7 @@ import mekanism.api.MekanismAPI;
|
||||
import mekanism.api.Pos3D;
|
||||
import mekanism.client.render.particle.EntityJetpackFlameFX;
|
||||
import mekanism.client.render.particle.EntityJetpackSmokeFX;
|
||||
import mekanism.client.render.particle.EntityScubaBubbleFX;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.item.ItemFlamethrower;
|
||||
import mekanism.common.item.ItemJetpack;
|
||||
@@ -31,8 +32,6 @@ import net.minecraftforge.fml.common.gameevent.TickEvent.RenderTickEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javafx.geometry.Pos;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderTickHandler
|
||||
{
|
||||
@@ -123,11 +122,11 @@ public class RenderTickHandler
|
||||
|
||||
float random = (rand.nextFloat() - 0.5F) * 0.1F;
|
||||
|
||||
Pos3D vLeft = new Pos3D(-0.43, -0.55, -0.54).rotateYaw(p.renderYawOffset);
|
||||
Pos3D vLeft = new Pos3D(-0.43, -0.55, -0.54).rotatePitch(p.isSneaking() ? 25 : 0).rotateYaw(p.renderYawOffset);
|
||||
|
||||
Pos3D vRight = new Pos3D(0.43, -0.55, -0.54).rotateYaw(p.renderYawOffset);
|
||||
Pos3D vRight = new Pos3D(0.43, -0.55, -0.54).rotatePitch(p.isSneaking() ? 25 : 0).rotateYaw(p.renderYawOffset);
|
||||
|
||||
Pos3D vCenter = new Pos3D((rand.nextFloat() - 0.5F) * 0.4F, -0.86, -0.30).rotateYaw(p.renderYawOffset);
|
||||
Pos3D vCenter = new Pos3D((rand.nextFloat() - 0.5F) * 0.4F, -0.86, -0.30).rotatePitch(p.isSneaking() ? 25 : 0).rotateYaw(p.renderYawOffset);
|
||||
|
||||
Pos3D rLeft = vLeft.scale(random);
|
||||
Pos3D rRight = vRight.clone().scale(random);
|
||||
@@ -153,6 +152,38 @@ public class RenderTickHandler
|
||||
}
|
||||
}
|
||||
|
||||
synchronized(Mekanism.gasmaskOn)
|
||||
{
|
||||
if(world.getWorldTime() % 4 == 0)
|
||||
{
|
||||
for(String s : Mekanism.gasmaskOn)
|
||||
{
|
||||
EntityPlayer p = mc.theWorld.getPlayerEntityByName(s);
|
||||
|
||||
if(p == null || !p.isInWater())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Pos3D playerPos = new Pos3D(p);
|
||||
|
||||
if(p != mc.thePlayer)
|
||||
{
|
||||
playerPos.translate(0, 1.7, 0);
|
||||
}
|
||||
|
||||
float xRand = (rand.nextFloat() - 0.5F) * 0.08F;
|
||||
float yRand = (rand.nextFloat() - 0.5F) * 0.05F;
|
||||
|
||||
Pos3D vec = new Pos3D(0.4, 0.4, 0.4).multiply(new Pos3D(p.getLook(90))).translate(0, -0.2, 0);
|
||||
Pos3D motion = vec.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
|
||||
|
||||
Pos3D v = playerPos.clone().translate(vec);
|
||||
spawnAndSetParticle("bubble", world, v.xPos, v.yPos, v.zPos, motion.xPos, motion.yPos + 0.2, motion.zPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(world.getWorldTime() % 4 == 0)
|
||||
{
|
||||
for(EntityPlayer p : world.playerEntities)
|
||||
@@ -219,6 +250,10 @@ public class RenderTickHandler
|
||||
{
|
||||
fx = new EntityJetpackSmokeFX(world, x, y, z, velX, velY, velZ);
|
||||
}
|
||||
else if(s.equals("bubble"))
|
||||
{
|
||||
fx = new EntityScubaBubbleFX(world, x, y, z, velX, velY, velZ);
|
||||
}
|
||||
|
||||
mc.effectRenderer.addEffect(fx);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user