Work on jetpacks/scuba stuff
This commit is contained in:
parent
8057d605a1
commit
d21ef524a0
11 changed files with 454 additions and 12 deletions
|
@ -289,6 +289,8 @@ public class ClientProxy extends CommonProxy
|
|||
MinecraftForgeClient.registerItemRenderer(Mekanism.basicBlockID, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Mekanism.Jetpack.itemID, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Mekanism.PartTransmitter.itemID, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Mekanism.GasMask.itemID, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Mekanism.ScubaTank.itemID, handler);
|
||||
|
||||
//Register block handlers
|
||||
RenderingRegistry.registerBlockHandler(new MachineRenderingHandler());
|
||||
|
|
|
@ -20,15 +20,16 @@ import mekanism.common.item.ItemConfigurator;
|
|||
import mekanism.common.item.ItemElectricBow;
|
||||
import mekanism.common.item.ItemGasMask;
|
||||
import mekanism.common.item.ItemJetpack;
|
||||
import mekanism.common.item.ItemWalkieTalkie;
|
||||
import mekanism.common.item.ItemJetpack.JetpackMode;
|
||||
import mekanism.common.item.ItemScubaTank;
|
||||
import mekanism.common.item.ItemWalkieTalkie;
|
||||
import mekanism.common.network.PacketConfiguratorState;
|
||||
import mekanism.common.network.PacketElectricBowState;
|
||||
import mekanism.common.network.PacketJetpackData;
|
||||
import mekanism.common.network.PacketWalkieTalkieState;
|
||||
import mekanism.common.network.PacketJetpackData.JetpackPacket;
|
||||
import mekanism.common.network.PacketScubaTankData;
|
||||
import mekanism.common.network.PacketScubaTankData.ScubaTankPacket;
|
||||
import mekanism.common.network.PacketWalkieTalkieState;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.StackUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -264,6 +265,24 @@ public class ClientTickHandler implements ITickHandler
|
|||
lastTickUpdate = false;
|
||||
}
|
||||
}
|
||||
else if(mc.thePlayer.getCurrentItemOrArmor(3) != null && mc.thePlayer.getCurrentItemOrArmor(3).getItem() instanceof ItemScubaTank)
|
||||
{
|
||||
ItemStack scubaTank = mc.thePlayer.getCurrentItemOrArmor(3);
|
||||
|
||||
if(MekanismKeyHandler.modeSwitchKey.pressed)
|
||||
{
|
||||
if(!lastTickUpdate)
|
||||
{
|
||||
((ItemScubaTank)scubaTank.getItem()).toggleFlowing(scubaTank);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketScubaTankData().setParams(ScubaTankPacket.MODE));
|
||||
Minecraft.getMinecraft().sndManager.playSoundFX("mekanism:etc.Hydraulic", 1.0F, 1.0F);
|
||||
lastTickUpdate = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
lastTickUpdate = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
lastTickUpdate = false;
|
||||
}
|
||||
|
@ -286,13 +305,14 @@ public class ClientTickHandler implements ITickHandler
|
|||
{
|
||||
if(isGasMaskOn(mc.thePlayer) && mc.currentScreen == null)
|
||||
{
|
||||
System.out.println("on");
|
||||
Mekanism.gasmaskOn.add(mc.thePlayer.username);
|
||||
}
|
||||
else {
|
||||
Mekanism.gasmaskOn.remove(mc.thePlayer.username);
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketScubaTankData().setParams(JetpackPacket.UPDATE, mc.thePlayer.username, isGasMaskOn(mc.thePlayer)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketScubaTankData().setParams(ScubaTankPacket.UPDATE, mc.thePlayer.username, isGasMaskOn(mc.thePlayer)));
|
||||
}
|
||||
|
||||
if(MekanismClient.audioHandler != null)
|
||||
|
|
267
common/mekanism/client/model/ModelGasMask.java
Normal file
267
common/mekanism/client/model/ModelGasMask.java
Normal file
|
@ -0,0 +1,267 @@
|
|||
package mekanism.client.model;
|
||||
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ModelGasMask extends ModelBase
|
||||
{
|
||||
ModelRenderer helmetfeed;
|
||||
ModelRenderer tubeback;
|
||||
ModelRenderer tubeL;
|
||||
ModelRenderer tubeR;
|
||||
ModelRenderer tubefront;
|
||||
ModelRenderer mouthintake;
|
||||
ModelRenderer finupperR;
|
||||
ModelRenderer finupperL;
|
||||
ModelRenderer finmidR;
|
||||
ModelRenderer finmidL;
|
||||
ModelRenderer finback;
|
||||
ModelRenderer topplate;
|
||||
ModelRenderer filterL;
|
||||
ModelRenderer filterR;
|
||||
ModelRenderer filterpipelower;
|
||||
ModelRenderer filterpipeupper;
|
||||
ModelRenderer glasstop;
|
||||
ModelRenderer glassfront;
|
||||
ModelRenderer glassR;
|
||||
ModelRenderer glassL;
|
||||
ModelRenderer glassbackR;
|
||||
ModelRenderer glassbackL;
|
||||
ModelRenderer pipecornerFL;
|
||||
ModelRenderer pipecornerFR;
|
||||
ModelRenderer pipecornerBR;
|
||||
ModelRenderer pipecornerBL;
|
||||
ModelRenderer lightL;
|
||||
ModelRenderer lightR;
|
||||
|
||||
public ModelGasMask()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
helmetfeed = new ModelRenderer(this, 88, 43);
|
||||
helmetfeed.addBox(-2F, -2F, 2F, 4, 3, 4);
|
||||
helmetfeed.setRotationPoint(0F, 0F, 0F);
|
||||
helmetfeed.setTextureSize(128, 64);
|
||||
helmetfeed.mirror = true;
|
||||
setRotation(helmetfeed, 0F, 0F, 0F);
|
||||
tubeback = new ModelRenderer(this, 106, 50);
|
||||
tubeback.addBox(-4.5F, -1F, 4.5F, 9, 1, 1);
|
||||
tubeback.setRotationPoint(0F, 0F, 0F);
|
||||
tubeback.setTextureSize(128, 64);
|
||||
tubeback.mirror = true;
|
||||
setRotation(tubeback, 0F, 0F, 0F);
|
||||
tubeL = new ModelRenderer(this, 106, 54);
|
||||
tubeL.addBox(4.5F, -1F, -4.5F, 1, 1, 9);
|
||||
tubeL.setRotationPoint(0F, 0F, 0F);
|
||||
tubeL.setTextureSize(128, 64);
|
||||
tubeL.mirror = true;
|
||||
setRotation(tubeL, 0F, 0F, 0F);
|
||||
tubeR = new ModelRenderer(this, 106, 54);
|
||||
tubeR.addBox(-5.5F, -1F, -4.5F, 1, 1, 9);
|
||||
tubeR.setRotationPoint(0F, 0F, 0F);
|
||||
tubeR.setTextureSize(128, 64);
|
||||
tubeR.mirror = true;
|
||||
setRotation(tubeR, 0F, 0F, 0F);
|
||||
tubefront = new ModelRenderer(this, 106, 50);
|
||||
tubefront.addBox(-4.5F, -1F, -5.5F, 9, 1, 1);
|
||||
tubefront.setRotationPoint(0F, 0F, 0F);
|
||||
tubefront.setTextureSize(128, 64);
|
||||
tubefront.mirror = true;
|
||||
setRotation(tubefront, 0F, 0F, 0F);
|
||||
mouthintake = new ModelRenderer(this, 118, 42);
|
||||
mouthintake.addBox(-1.5F, -0.7F, -6F, 3, 2, 3);
|
||||
mouthintake.setRotationPoint(0F, -2F, 0F);
|
||||
mouthintake.setTextureSize(128, 64);
|
||||
mouthintake.mirror = true;
|
||||
setRotation(mouthintake, 0.2094395F, 0F, 0F);
|
||||
finupperR = new ModelRenderer(this, 78, 50);
|
||||
finupperR.addBox(-6F, -7.5F, -3.3F, 1, 2, 12);
|
||||
finupperR.setRotationPoint(0F, 0F, 0F);
|
||||
finupperR.setTextureSize(128, 64);
|
||||
finupperR.mirror = true;
|
||||
setRotation(finupperR, 0.0698132F, 0F, 0F);
|
||||
finupperL = new ModelRenderer(this, 78, 50);
|
||||
finupperL.addBox(5F, -7.5F, -3.3F, 1, 2, 12);
|
||||
finupperL.setRotationPoint(0F, 0F, 0F);
|
||||
finupperL.setTextureSize(128, 64);
|
||||
finupperL.mirror = true;
|
||||
setRotation(finupperL, 0.0698132F, 0F, 0F);
|
||||
finupperL.mirror = false;
|
||||
finmidR = new ModelRenderer(this, 72, 34);
|
||||
finmidR.addBox(-7.5F, -6F, -1F, 2, 2, 5);
|
||||
finmidR.setRotationPoint(0F, 0F, 0F);
|
||||
finmidR.setTextureSize(128, 64);
|
||||
finmidR.mirror = true;
|
||||
setRotation(finmidR, 0F, 0F, 0F);
|
||||
finmidL = new ModelRenderer(this, 72, 34);
|
||||
finmidL.addBox(5.5F, -6F, -1F, 2, 2, 5);
|
||||
finmidL.setRotationPoint(0F, 0F, 0F);
|
||||
finmidL.setTextureSize(128, 64);
|
||||
finmidL.mirror = true;
|
||||
setRotation(finmidL, 0F, 0F, 0F);
|
||||
finmidL.mirror = false;
|
||||
finback = new ModelRenderer(this, 80, 0);
|
||||
finback.addBox(-1F, -9.6F, 2.5F, 2, 10, 3);
|
||||
finback.setRotationPoint(0F, 0F, 0F);
|
||||
finback.setTextureSize(128, 64);
|
||||
finback.mirror = true;
|
||||
setRotation(finback, 0F, 0F, 0F);
|
||||
topplate = new ModelRenderer(this, 104, 34);
|
||||
topplate.addBox(-3F, -10F, -2F, 6, 2, 6);
|
||||
topplate.setRotationPoint(0F, 0F, 0F);
|
||||
topplate.setTextureSize(128, 64);
|
||||
topplate.mirror = true;
|
||||
setRotation(topplate, 0.1396263F, 0F, 0F);
|
||||
filterL = new ModelRenderer(this, 108, 42);
|
||||
filterL.addBox(3.4F, -1.8F, -5F, 2, 3, 3);
|
||||
filterL.setRotationPoint(0F, 0F, 0F);
|
||||
filterL.setTextureSize(128, 64);
|
||||
filterL.mirror = true;
|
||||
setRotation(filterL, 0F, 0.3839724F, 0.5061455F);
|
||||
filterL.mirror = false;
|
||||
filterR = new ModelRenderer(this, 108, 42);
|
||||
filterR.addBox(-5.4F, -1.8F, -5F, 2, 3, 3);
|
||||
filterR.setRotationPoint(0F, 0F, 0F);
|
||||
filterR.setTextureSize(128, 64);
|
||||
filterR.mirror = true;
|
||||
setRotation(filterR, 0F, -0.3839724F, -0.5061455F);
|
||||
filterpipelower = new ModelRenderer(this, 92, 41);
|
||||
filterpipelower.addBox(-3F, 1F, -5F, 5, 1, 1);
|
||||
filterpipelower.setRotationPoint(0F, 0F, 0F);
|
||||
filterpipelower.setTextureSize(128, 64);
|
||||
filterpipelower.mirror = true;
|
||||
setRotation(filterpipelower, 0F, 0F, 0F);
|
||||
filterpipeupper = new ModelRenderer(this, 104, 42);
|
||||
filterpipeupper.addBox(-0.5F, 0F, -5F, 1, 1, 1);
|
||||
filterpipeupper.setRotationPoint(0F, 0F, 0F);
|
||||
filterpipeupper.setTextureSize(128, 64);
|
||||
filterpipeupper.mirror = true;
|
||||
setRotation(filterpipeupper, 0F, 0F, 0F);
|
||||
glasstop = new ModelRenderer(this, 0, 0);
|
||||
glasstop.addBox(-4F, -9F, -4F, 8, 1, 8);
|
||||
glasstop.setRotationPoint(0F, 0F, 0F);
|
||||
glasstop.setTextureSize(128, 64);
|
||||
glasstop.mirror = true;
|
||||
setRotation(glasstop, 0F, 0F, 0F);
|
||||
glassfront = new ModelRenderer(this, 0, 0);
|
||||
glassfront.addBox(-4F, -8F, -5F, 8, 7, 1);
|
||||
glassfront.setRotationPoint(0F, 0F, 0F);
|
||||
glassfront.setTextureSize(128, 64);
|
||||
glassfront.mirror = true;
|
||||
setRotation(glassfront, 0F, 0F, 0F);
|
||||
glassR = new ModelRenderer(this, 0, 0);
|
||||
glassR.addBox(-5F, -8F, -4F, 1, 7, 8);
|
||||
glassR.setRotationPoint(0F, 0F, 0F);
|
||||
glassR.setTextureSize(128, 64);
|
||||
glassR.mirror = true;
|
||||
setRotation(glassR, 0F, 0F, 0F);
|
||||
glassL = new ModelRenderer(this, 0, 0);
|
||||
glassL.addBox(4F, -8F, -4F, 1, 7, 8);
|
||||
glassL.setRotationPoint(0F, 0F, 0F);
|
||||
glassL.setTextureSize(128, 64);
|
||||
glassL.mirror = true;
|
||||
setRotation(glassL, 0F, 0F, 0F);
|
||||
glassbackR = new ModelRenderer(this, 0, 0);
|
||||
glassbackR.addBox(-4F, -8F, 4F, 3, 7, 1);
|
||||
glassbackR.setRotationPoint(0F, 0F, 0F);
|
||||
glassbackR.setTextureSize(128, 64);
|
||||
glassbackR.mirror = true;
|
||||
setRotation(glassbackR, 0F, 0F, 0F);
|
||||
glassbackL = new ModelRenderer(this, 0, 0);
|
||||
glassbackL.addBox(1F, -8F, 4F, 3, 7, 1);
|
||||
glassbackL.setRotationPoint(0F, 0F, 0F);
|
||||
glassbackL.setTextureSize(128, 64);
|
||||
glassbackL.mirror = true;
|
||||
setRotation(glassbackL, 0F, 0F, 0F);
|
||||
pipecornerFL = new ModelRenderer(this, 109, 50);
|
||||
pipecornerFL.addBox(3.5F, -1F, -4.5F, 1, 1, 1);
|
||||
pipecornerFL.setRotationPoint(0F, 0F, 0F);
|
||||
pipecornerFL.setTextureSize(128, 64);
|
||||
pipecornerFL.mirror = true;
|
||||
setRotation(pipecornerFL, 0F, 0F, 0F);
|
||||
pipecornerFR = new ModelRenderer(this, 109, 50);
|
||||
pipecornerFR.addBox(-4.5F, -1F, -4.5F, 1, 1, 1);
|
||||
pipecornerFR.setRotationPoint(0F, 0F, 0F);
|
||||
pipecornerFR.setTextureSize(128, 64);
|
||||
pipecornerFR.mirror = true;
|
||||
setRotation(pipecornerFR, 0F, 0F, 0F);
|
||||
pipecornerBR = new ModelRenderer(this, 109, 50);
|
||||
pipecornerBR.addBox(-4.5F, -1F, 3.5F, 1, 1, 1);
|
||||
pipecornerBR.setRotationPoint(0F, 0F, 0F);
|
||||
pipecornerBR.setTextureSize(128, 64);
|
||||
pipecornerBR.mirror = true;
|
||||
setRotation(pipecornerBR, 0F, 0F, 0F);
|
||||
pipecornerBL = new ModelRenderer(this, 109, 50);
|
||||
pipecornerBL.addBox(3.5F, -1F, 4.5F, 1, 1, 1);
|
||||
pipecornerBL.setRotationPoint(0F, 0F, -1F);
|
||||
pipecornerBL.setTextureSize(128, 64);
|
||||
pipecornerBL.mirror = true;
|
||||
setRotation(pipecornerBL, 0F, 0F, 0F);
|
||||
lightL = new ModelRenderer(this, 89, 37);
|
||||
lightL.addBox(5.5F, -6F, -2F, 2, 2, 1);
|
||||
lightL.setRotationPoint(0F, 0F, 0F);
|
||||
lightL.setTextureSize(128, 64);
|
||||
lightL.mirror = true;
|
||||
setRotation(lightL, 0F, 0F, 0F);
|
||||
lightR = new ModelRenderer(this, 89, 37);
|
||||
lightR.addBox(-7.5F, -6F, -2F, 2, 2, 1);
|
||||
lightR.setRotationPoint(0F, 0F, 0F);
|
||||
lightR.setTextureSize(128, 64);
|
||||
lightR.mirror = true;
|
||||
setRotation(lightR, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(float size)
|
||||
{
|
||||
helmetfeed.render(size);
|
||||
tubeback.render(size);
|
||||
tubeL.render(size);
|
||||
tubeR.render(size);
|
||||
tubefront.render(size);
|
||||
mouthintake.render(size);
|
||||
finupperR.render(size);
|
||||
finupperL.render(size);
|
||||
finmidR.render(size);
|
||||
finmidL.render(size);
|
||||
finback.render(size);
|
||||
topplate.render(size);
|
||||
filterL.render(size);
|
||||
filterR.render(size);
|
||||
filterpipelower.render(size);
|
||||
filterpipeupper.render(size);
|
||||
|
||||
MekanismRenderer.blendOn();
|
||||
GL11.glColor4f(1, 1, 1, 0.4F);
|
||||
|
||||
glasstop.render(size);
|
||||
glassfront.render(size);
|
||||
glassR.render(size);
|
||||
glassL.render(size);
|
||||
glassbackR.render(size);
|
||||
glassbackL.render(size);
|
||||
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
MekanismRenderer.blendOff();
|
||||
|
||||
pipecornerFL.render(size);
|
||||
pipecornerFR.render(size);
|
||||
pipecornerBR.render(size);
|
||||
pipecornerBL.render(size);
|
||||
|
||||
MekanismRenderer.glowOn();
|
||||
lightL.render(size);
|
||||
lightR.render(size);
|
||||
MekanismRenderer.glowOff();
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
|
@ -28,6 +28,9 @@ public class ModelJetpack extends ModelBase
|
|||
ModelRenderer Packdoodad2;
|
||||
ModelRenderer Packdoodad3;
|
||||
ModelRenderer Bottomthruster;
|
||||
ModelRenderer light1;
|
||||
ModelRenderer light2;
|
||||
ModelRenderer light3;
|
||||
|
||||
public ModelJetpack()
|
||||
{
|
||||
|
@ -154,6 +157,24 @@ public class ModelJetpack extends ModelBase
|
|||
Bottomthruster.setTextureSize(128, 64);
|
||||
Bottomthruster.mirror = true;
|
||||
setRotation(Bottomthruster, 0F, 0F, 0F);
|
||||
light1 = new ModelRenderer(this, 55, 2);
|
||||
light1.addBox(2F, 6.55F, 4F, 1, 1, 1);
|
||||
light1.setRotationPoint(0F, 0F, 0F);
|
||||
light1.setTextureSize(128, 64);
|
||||
light1.mirror = true;
|
||||
setRotation(light1, 0F, 0F, 0F);
|
||||
light2 = new ModelRenderer(this, 55, 2);
|
||||
light2.addBox(0F, 6.55F, 4F, 1, 1, 1);
|
||||
light2.setRotationPoint(0F, 0F, 0F);
|
||||
light2.setTextureSize(128, 64);
|
||||
light2.mirror = true;
|
||||
setRotation(light2, 0F, 0F, 0F);
|
||||
light3 = new ModelRenderer(this, 55, 2);
|
||||
light3.addBox(-3F, 6.55F, 4F, 1, 1, 1);
|
||||
light3.setRotationPoint(0F, 0F, 0F);
|
||||
light3.setTextureSize(128, 64);
|
||||
light3.mirror = true;
|
||||
setRotation(light3, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(float size)
|
||||
|
@ -196,6 +217,12 @@ public class ModelJetpack extends ModelBase
|
|||
Packdoodad2.render(size);
|
||||
Packdoodad3.render(size);
|
||||
Bottomthruster.render(size);
|
||||
|
||||
MekanismRenderer.glowOn();
|
||||
light1.render(size);
|
||||
light2.render(size);
|
||||
light3.render(size);
|
||||
MekanismRenderer.glowOff();
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
|
|
100
common/mekanism/client/model/ModelScubaTank.java
Normal file
100
common/mekanism/client/model/ModelScubaTank.java
Normal file
|
@ -0,0 +1,100 @@
|
|||
package mekanism.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelScubaTank extends ModelBase
|
||||
{
|
||||
ModelRenderer tankL;
|
||||
ModelRenderer tankR;
|
||||
ModelRenderer tankdock;
|
||||
ModelRenderer capL;
|
||||
ModelRenderer capR;
|
||||
ModelRenderer tankbridge;
|
||||
ModelRenderer tankpipelower;
|
||||
ModelRenderer tankpipeupper;
|
||||
ModelRenderer tankbackbrace;
|
||||
|
||||
public ModelScubaTank()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
tankL = new ModelRenderer(this, 23, 54);
|
||||
tankL.addBox(-1F, 2F, 4F, 3, 7, 3);
|
||||
tankL.setRotationPoint(0F, 0F, 0F);
|
||||
tankL.setTextureSize(128, 64);
|
||||
tankL.mirror = true;
|
||||
setRotation(tankL, -0.2443461F, 0.5235988F, 0F);
|
||||
tankR = new ModelRenderer(this, 23, 54);
|
||||
tankR.addBox(-2F, 2F, 4F, 3, 7, 3);
|
||||
tankR.setRotationPoint(0F, 0F, 0F);
|
||||
tankR.setTextureSize(128, 64);
|
||||
tankR.mirror = true;
|
||||
setRotation(tankR, -0.2443461F, -0.5235988F, 0F);
|
||||
tankR.mirror = false;
|
||||
tankdock = new ModelRenderer(this, 0, 55);
|
||||
tankdock.addBox(-2F, 5F, 1F, 4, 4, 5);
|
||||
tankdock.setRotationPoint(0F, 0F, 0F);
|
||||
tankdock.setTextureSize(128, 64);
|
||||
tankdock.mirror = true;
|
||||
setRotation(tankdock, 0F, 0F, 0F);
|
||||
capL = new ModelRenderer(this, 23, 51);
|
||||
capL.addBox(-0.5F, 1F, 4.5F, 2, 1, 2);
|
||||
capL.setRotationPoint(0F, 0F, 0F);
|
||||
capL.setTextureSize(128, 64);
|
||||
capL.mirror = true;
|
||||
setRotation(capL, -0.2443461F, 0.5235988F, 0F);
|
||||
capR = new ModelRenderer(this, 23, 51);
|
||||
capR.addBox(-1.5F, 1F, 4.5F, 2, 1, 2);
|
||||
capR.setRotationPoint(0F, 0F, 0F);
|
||||
capR.setTextureSize(128, 64);
|
||||
capR.mirror = true;
|
||||
setRotation(capR, -0.2443461F, -0.5235988F, 0F);
|
||||
tankbridge = new ModelRenderer(this, 0, 47);
|
||||
tankbridge.addBox(-1F, 3F, -1.5F, 2, 5, 3);
|
||||
tankbridge.setRotationPoint(0F, 0F, 0F);
|
||||
tankbridge.setTextureSize(128, 64);
|
||||
tankbridge.mirror = true;
|
||||
setRotation(tankbridge, 0.5934119F, 0F, 0F);
|
||||
tankpipelower = new ModelRenderer(this, 0, 37);
|
||||
tankpipelower.addBox(-0.5F, 2F, 3F, 1, 4, 1);
|
||||
tankpipelower.setRotationPoint(0F, 0F, 0F);
|
||||
tankpipelower.setTextureSize(128, 64);
|
||||
tankpipelower.mirror = true;
|
||||
setRotation(tankpipelower, 0.2094395F, 0F, 0F);
|
||||
tankpipeupper = new ModelRenderer(this, 4, 38);
|
||||
tankpipeupper.addBox(-0.5F, 1F, 1.5F, 1, 1, 3);
|
||||
tankpipeupper.setRotationPoint(0F, 0F, 0F);
|
||||
tankpipeupper.setTextureSize(128, 64);
|
||||
tankpipeupper.mirror = true;
|
||||
setRotation(tankpipeupper, 0F, 0F, 0F);
|
||||
tankbackbrace = new ModelRenderer(this, 0, 42);
|
||||
tankbackbrace.addBox(-3F, 2F, 0.5F, 6, 3, 2);
|
||||
tankbackbrace.setRotationPoint(0F, 0F, 0F);
|
||||
tankbackbrace.setTextureSize(128, 64);
|
||||
tankbackbrace.mirror = true;
|
||||
setRotation(tankbackbrace, 0.2443461F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(float size)
|
||||
{
|
||||
tankL.render(size);
|
||||
tankR.render(size);
|
||||
tankdock.render(size);
|
||||
capL.render(size);
|
||||
capR.render(size);
|
||||
tankbridge.render(size);
|
||||
tankpipelower.render(size);
|
||||
tankpipeupper.render(size);
|
||||
tankbackbrace.render(size);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
package mekanism.client.render;
|
||||
|
||||
import mekanism.client.model.ModelGasMask;
|
||||
import mekanism.client.model.ModelJetpack;
|
||||
import mekanism.client.model.ModelScubaTank;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -112,11 +114,11 @@ public class ModelCustomArmor extends ModelBiped
|
|||
}
|
||||
else if(biped.modelType == ArmorModel.SCUBATANK)
|
||||
{
|
||||
|
||||
ArmorModel.scubaTankModel.render(0.0625F);
|
||||
}
|
||||
else if(biped.modelType == ArmorModel.GASMASK)
|
||||
{
|
||||
|
||||
ArmorModel.gasMaskModel.render(0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,13 +151,15 @@ public class ModelCustomArmor extends ModelBiped
|
|||
public static enum ArmorModel
|
||||
{
|
||||
JETPACK(1, MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png")),
|
||||
SCUBATANK(1, MekanismUtils.getResource(ResourceType.RENDER, "ScubaTank.png")),
|
||||
GASMASK(0, MekanismUtils.getResource(ResourceType.RENDER, "GasMask.png"));
|
||||
SCUBATANK(1, MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png")),
|
||||
GASMASK(0, MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png"));
|
||||
|
||||
public int armorSlot;
|
||||
public ResourceLocation resource;
|
||||
|
||||
public static ModelJetpack jetpackModel = new ModelJetpack();
|
||||
public static ModelGasMask gasMaskModel = new ModelGasMask();
|
||||
public static ModelScubaTank scubaTankModel = new ModelScubaTank();
|
||||
|
||||
private ArmorModel(int i, ResourceLocation r)
|
||||
{
|
||||
|
|
|
@ -175,10 +175,6 @@ public class RenderTickHandler implements ITickHandler
|
|||
{
|
||||
fx = new EntitySmokeFX(world, x, y, z, velX, velY, velZ);
|
||||
}
|
||||
|
||||
fx.prevPosX = fx.posX = x;
|
||||
fx.prevPosY = fx.posY = y;
|
||||
fx.prevPosZ = fx.posZ = z;
|
||||
|
||||
mc.effectRenderer.addEffect(fx);
|
||||
}
|
||||
|
|
|
@ -8,10 +8,12 @@ import mekanism.client.ClientProxy;
|
|||
import mekanism.client.MekanismClient;
|
||||
import mekanism.client.model.ModelEnergyCube;
|
||||
import mekanism.client.model.ModelEnergyCube.ModelEnergyCore;
|
||||
import mekanism.client.model.ModelGasMask;
|
||||
import mekanism.client.model.ModelGasTank;
|
||||
import mekanism.client.model.ModelJetpack;
|
||||
import mekanism.client.model.ModelObsidianTNT;
|
||||
import mekanism.client.model.ModelRobit;
|
||||
import mekanism.client.model.ModelScubaTank;
|
||||
import mekanism.client.model.ModelTransmitter;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.client.render.tileentity.RenderBin;
|
||||
|
@ -23,8 +25,10 @@ import mekanism.common.block.BlockMachine.MachineType;
|
|||
import mekanism.common.inventory.InventoryBin;
|
||||
import mekanism.common.item.ItemBlockBasic;
|
||||
import mekanism.common.item.ItemBlockMachine;
|
||||
import mekanism.common.item.ItemGasMask;
|
||||
import mekanism.common.item.ItemJetpack;
|
||||
import mekanism.common.item.ItemRobit;
|
||||
import mekanism.common.item.ItemScubaTank;
|
||||
import mekanism.common.item.ItemWalkieTalkie;
|
||||
import mekanism.common.multipart.ItemPartTransmitter;
|
||||
import mekanism.common.tileentity.TileEntityBin;
|
||||
|
@ -64,6 +68,8 @@ public class ItemRenderingHandler implements IItemRenderer
|
|||
public ModelGasTank gasTank = new ModelGasTank();
|
||||
public ModelObsidianTNT obsidianTNT = new ModelObsidianTNT();
|
||||
public ModelJetpack jetpack = new ModelJetpack();
|
||||
public ModelGasMask gasMask = new ModelGasMask();
|
||||
public ModelScubaTank scubaTank = new ModelScubaTank();
|
||||
|
||||
public RenderBin binRenderer = (RenderBin)TileEntityRenderer.instance.specialRendererMap.get(TileEntityBin.class);
|
||||
private final RenderItem renderItem = (RenderItem)RenderManager.instance.getEntityClassRenderObject(EntityItem.class);
|
||||
|
@ -320,6 +326,23 @@ public class ItemRenderingHandler implements IItemRenderer
|
|||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png"));
|
||||
jetpack.render(0.0625F);
|
||||
}
|
||||
else if(item.getItem() instanceof ItemGasMask)
|
||||
{
|
||||
GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.2F, 1F, 0.0F);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png"));
|
||||
gasMask.render(0.0625F);
|
||||
}
|
||||
else if(item.getItem() instanceof ItemScubaTank)
|
||||
{
|
||||
GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(90, 0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.2F, -0.35F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ScubaSet.png"));
|
||||
scubaTank.render(0.0625F);
|
||||
}
|
||||
else if(item.getItem() instanceof ItemPartTransmitter)
|
||||
{
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
|
|
|
@ -610,7 +610,8 @@ public class Mekanism
|
|||
configuration.load();
|
||||
ElectricBow = (ItemElectricBow)new ItemElectricBow(configuration.getItem("ElectricBow", 11200).getInt()).setUnlocalizedName("ElectricBow");
|
||||
Dictionary = new ItemDictionary(configuration.getItem("Dictionary", 11201).getInt()).setUnlocalizedName("Dictionary");
|
||||
//OPEN 11202-11203
|
||||
GasMask = (ItemGasMask)new ItemGasMask(configuration.getItem("GasMask", 11202).getInt()).setUnlocalizedName("GasMask");
|
||||
ScubaTank = (ItemScubaTank)new ItemScubaTank(configuration.getItem("ScubaTank", 11203).getInt()).setUnlocalizedName("ScubaTank");
|
||||
Dust = new ItemDust(configuration.getItem("Dust", 11204).getInt()-256);
|
||||
Ingot = new ItemIngot(configuration.getItem("Ingot", 11205).getInt()-256);
|
||||
EnergyTablet = (ItemEnergized)new ItemEnergized(configuration.getItem("EnergyTablet", 11206).getInt(), 1000000, 120).setUnlocalizedName("EnergyTablet");
|
||||
|
@ -660,6 +661,8 @@ public class Mekanism
|
|||
GameRegistry.registerItem(WalkieTalkie, "WalkieTalkie");
|
||||
GameRegistry.registerItem(Jetpack, "Jetpack");
|
||||
GameRegistry.registerItem(Dictionary, "Dictionary");
|
||||
GameRegistry.registerItem(GasMask, "GasMask");
|
||||
GameRegistry.registerItem(ScubaTank, "ScubaTank");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
BIN
resources/assets/mekanism/render/ScubaSet.png
Normal file
BIN
resources/assets/mekanism/render/ScubaSet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
resources/assets/mekanism/sound/GasMask.ogg
Normal file
BIN
resources/assets/mekanism/sound/GasMask.ogg
Normal file
Binary file not shown.
Loading…
Reference in a new issue