New models and fixes!
|
@ -35,19 +35,22 @@ import mekanism.client.render.RenderTickHandler;
|
|||
import mekanism.client.render.block.BasicRenderingHandler;
|
||||
import mekanism.client.render.block.MachineRenderingHandler;
|
||||
import mekanism.client.render.block.TransmitterRenderingHandler;
|
||||
import mekanism.client.render.entity.RenderObsidianTNT;
|
||||
import mekanism.client.render.entity.RenderObsidianTNTPrimed;
|
||||
import mekanism.client.render.entity.RenderRobit;
|
||||
import mekanism.client.render.item.ItemRenderingHandler;
|
||||
import mekanism.client.render.tileentity.RenderChargepad;
|
||||
import mekanism.client.render.tileentity.RenderConfigurableMachine;
|
||||
import mekanism.client.render.tileentity.RenderCrusher;
|
||||
import mekanism.client.render.tileentity.RenderDynamicTank;
|
||||
import mekanism.client.render.tileentity.RenderElectricChest;
|
||||
import mekanism.client.render.tileentity.RenderElectricPump;
|
||||
import mekanism.client.render.tileentity.RenderEnergyCube;
|
||||
import mekanism.client.render.tileentity.RenderGasTank;
|
||||
import mekanism.client.render.tileentity.RenderLogisticalSorter;
|
||||
import mekanism.client.render.tileentity.RenderLogisticalTransporter;
|
||||
import mekanism.client.render.tileentity.RenderMechanicalPipe;
|
||||
import mekanism.client.render.tileentity.RenderMetallurgicInfuser;
|
||||
import mekanism.client.render.tileentity.RenderObsidianTNT;
|
||||
import mekanism.client.render.tileentity.RenderPressurizedTube;
|
||||
import mekanism.client.render.tileentity.RenderUniversalCable;
|
||||
import mekanism.client.sound.Sound;
|
||||
|
@ -79,6 +82,7 @@ import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
|||
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||
import mekanism.common.tileentity.TileEntityMechanicalPipe;
|
||||
import mekanism.common.tileentity.TileEntityMetallurgicInfuser;
|
||||
import mekanism.common.tileentity.TileEntityObsidianTNT;
|
||||
import mekanism.common.tileentity.TileEntityOsmiumCompressor;
|
||||
import mekanism.common.tileentity.TileEntityPressurizedTube;
|
||||
import mekanism.common.tileentity.TileEntityPurificationChamber;
|
||||
|
@ -219,13 +223,15 @@ public class ClientProxy extends CommonProxy
|
|||
ClientRegistry.registerTileEntity(TileEntityEnrichmentChamber.class, "EnrichmentChamber", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityOsmiumCompressor.class, "OsmiumCompressor", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityCombiner.class, "Combiner", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityCrusher.class, "Crusher", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityCrusher.class, "Crusher", new RenderCrusher());
|
||||
ClientRegistry.registerTileEntity(TileEntityFactory.class, "SmeltingFactory", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityAdvancedFactory.class, "AdvancedSmeltingFactory", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityEliteFactory.class, "UltimateSmeltingFactory", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityPurificationChamber.class, "PurificationChamber", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityEnergizedSmelter.class, "EnergizedSmelter", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser", new RenderMetallurgicInfuser());
|
||||
ClientRegistry.registerTileEntity(TileEntityObsidianTNT.class, "ObsidianTNT", new RenderObsidianTNT());
|
||||
ClientRegistry.registerTileEntity(TileEntityGasTank.class, "GasTank", new RenderGasTank());
|
||||
ClientRegistry.registerTileEntity(TileEntityEnergyCube.class, "EnergyCube", new RenderEnergyCube());
|
||||
ClientRegistry.registerTileEntity(TileEntityPressurizedTube.class, "PressurizedTube", new RenderPressurizedTube());
|
||||
ClientRegistry.registerTileEntity(TileEntityUniversalCable.class, "UniversalCable", new RenderUniversalCable());
|
||||
|
@ -243,7 +249,7 @@ public class ClientProxy extends CommonProxy
|
|||
public void registerRenderInformation()
|
||||
{
|
||||
//Register entity rendering handlers
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityObsidianTNT.class, new RenderObsidianTNT());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityObsidianTNT.class, new RenderObsidianTNTPrimed());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityRobit.class, new RenderRobit());
|
||||
|
||||
//Register item handler
|
||||
|
@ -251,6 +257,8 @@ public class ClientProxy extends CommonProxy
|
|||
MinecraftForgeClient.registerItemRenderer(Mekanism.machineBlockID, new ItemRenderingHandler());
|
||||
MinecraftForgeClient.registerItemRenderer(Mekanism.Robit.itemID, new ItemRenderingHandler());
|
||||
MinecraftForgeClient.registerItemRenderer(Mekanism.WalkieTalkie.itemID, new ItemRenderingHandler());
|
||||
MinecraftForgeClient.registerItemRenderer(Mekanism.gasTankID, new ItemRenderingHandler());
|
||||
MinecraftForgeClient.registerItemRenderer(Mekanism.obsidianTNTID, new ItemRenderingHandler());
|
||||
|
||||
//Register block handlers
|
||||
RenderingRegistry.registerBlockHandler(new MachineRenderingHandler());
|
||||
|
|
|
@ -179,6 +179,14 @@ public class GuiLogisticalSorter extends GuiMekanism
|
|||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
}
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 26 && yAxis >= 110 && yAxis <= 124)
|
||||
{
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(1);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,6 +257,9 @@ public class GuiLogisticalSorter extends GuiMekanism
|
|||
fontRenderer.drawString("IS: " + getItemStackFilters().size(), 11, 37, 0x00CD00);
|
||||
fontRenderer.drawString("OD: " + getOreDictFilters().size(), 11, 46, 0x00CD00);
|
||||
|
||||
fontRenderer.drawString("Auto:", 12, 100, 0x00CD00);
|
||||
fontRenderer.drawString(tileEntity.autoEject ? "On" : "Off", 27, 112, 0x00CD00);
|
||||
|
||||
fontRenderer.drawString("Default:", 12, 126, 0x00CD00);
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
|
@ -361,6 +372,14 @@ public class GuiLogisticalSorter extends GuiMekanism
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 26 && yAxis >= 110 && yAxis <= 124)
|
||||
{
|
||||
drawTexturedModalRect(guiWidth + 12, guiHeight + 110, 176, 0, 14, 14);
|
||||
}
|
||||
else {
|
||||
drawTexturedModalRect(guiWidth + 12, guiHeight + 110, 176, 14, 14, 14);
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList getItemStackFilters()
|
||||
|
|
118
common/mekanism/client/model/ModelCrusher.java
Normal file
|
@ -0,0 +1,118 @@
|
|||
package mekanism.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCrusher extends ModelBase
|
||||
{
|
||||
ModelRenderer Top;
|
||||
ModelRenderer Base;
|
||||
ModelRenderer RightWall;
|
||||
ModelRenderer RightWall2;
|
||||
ModelRenderer PistonDecor;
|
||||
ModelRenderer PistonRod;
|
||||
ModelRenderer Pad;
|
||||
ModelRenderer PistonHead;
|
||||
ModelRenderer BackWall;
|
||||
ModelRenderer BackWall2;
|
||||
ModelRenderer TopTop;
|
||||
|
||||
public ModelCrusher()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
Top = new ModelRenderer(this, 0, 18);
|
||||
Top.addBox(0F, 0F, 0F, 14, 1, 8);
|
||||
Top.setRotationPoint(-7F, 14F, -4F);
|
||||
Top.setTextureSize(128, 64);
|
||||
Top.mirror = true;
|
||||
setRotation(Top, 0F, 0F, 0F);
|
||||
Base = new ModelRenderer(this, 0, 0);
|
||||
Base.addBox(0F, 0F, 0F, 16, 1, 16);
|
||||
Base.setRotationPoint(-8F, 23F, -8F);
|
||||
Base.setTextureSize(128, 64);
|
||||
Base.mirror = true;
|
||||
setRotation(Base, 0F, 0F, 0F);
|
||||
RightWall = new ModelRenderer(this, 0, 28);
|
||||
RightWall.addBox(0F, 0F, 0F, 4, 6, 14);
|
||||
RightWall.setRotationPoint(-8F, 17F, -7F);
|
||||
RightWall.setTextureSize(128, 64);
|
||||
RightWall.mirror = true;
|
||||
setRotation(RightWall, 0F, 0F, 0F);
|
||||
RightWall2 = new ModelRenderer(this, 0, 49);
|
||||
RightWall2.addBox(0F, 0F, 0F, 4, 2, 12);
|
||||
RightWall2.setRotationPoint(-8F, 15F, -6F);
|
||||
RightWall2.setTextureSize(128, 64);
|
||||
RightWall2.mirror = true;
|
||||
setRotation(RightWall2, 0F, 0F, 0F);
|
||||
PistonDecor = new ModelRenderer(this, 65, 0);
|
||||
PistonDecor.addBox(0F, 0F, 0F, 7, 1, 7);
|
||||
PistonDecor.setRotationPoint(-0.5F, 14.5F, -3.5F);
|
||||
PistonDecor.setTextureSize(128, 64);
|
||||
PistonDecor.mirror = true;
|
||||
setRotation(PistonDecor, 0F, 0F, 0F);
|
||||
PistonRod = new ModelRenderer(this, 45, 18);
|
||||
PistonRod.addBox(0F, 0F, 0F, 1, 6, 1);
|
||||
PistonRod.setRotationPoint(2.5F, 13F, -0.5F);
|
||||
PistonRod.setTextureSize(128, 64);
|
||||
PistonRod.mirror = true;
|
||||
setRotation(PistonRod, 0F, 0F, 0F);
|
||||
Pad = new ModelRenderer(this, 50, 18);
|
||||
Pad.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Pad.setRotationPoint(1F, 22.7F, -2F);
|
||||
Pad.setTextureSize(128, 64);
|
||||
Pad.mirror = true;
|
||||
setRotation(Pad, 0F, 0F, 0F);
|
||||
PistonHead = new ModelRenderer(this, 67, 18);
|
||||
PistonHead.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
PistonHead.setRotationPoint(1F, 19F, -2F);
|
||||
PistonHead.setTextureSize(128, 64);
|
||||
PistonHead.mirror = true;
|
||||
setRotation(PistonHead, 0F, 0F, 0F);
|
||||
BackWall = new ModelRenderer(this, 94, 0);
|
||||
BackWall.addBox(0F, 0F, 0F, 11, 6, 2);
|
||||
BackWall.setRotationPoint(-4F, 17F, 5F);
|
||||
BackWall.setTextureSize(128, 64);
|
||||
BackWall.mirror = true;
|
||||
setRotation(BackWall, 0F, 0F, 0F);
|
||||
BackWall2 = new ModelRenderer(this, 90, 9);
|
||||
BackWall2.addBox(0F, 0F, 0F, 11, 2, 3);
|
||||
BackWall2.setRotationPoint(-4F, 15F, 3F);
|
||||
BackWall2.setTextureSize(128, 64);
|
||||
BackWall2.mirror = true;
|
||||
setRotation(BackWall2, 0F, 0F, 0F);
|
||||
TopTop = new ModelRenderer(this, 90, 15);
|
||||
TopTop.addBox(0F, 0F, 0F, 6, 5, 6);
|
||||
TopTop.setRotationPoint(0F, 12F, -3F);
|
||||
TopTop.setTextureSize(128, 64);
|
||||
TopTop.mirror = true;
|
||||
setRotation(TopTop, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(float size, float depth)
|
||||
{
|
||||
PistonRod.setRotationPoint(2.5F, 13F+depth, -0.5F);
|
||||
PistonHead.setRotationPoint(1F, 19F+depth, -2F);
|
||||
|
||||
Top.render(size);
|
||||
Base.render(size);
|
||||
RightWall.render(size);
|
||||
RightWall2.render(size);
|
||||
PistonDecor.render(size);
|
||||
PistonRod.render(size);
|
||||
Pad.render(size);
|
||||
PistonHead.render(size);
|
||||
BackWall.render(size);
|
||||
BackWall2.render(size);
|
||||
TopTop.render(size);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@ public class ModelEnergyCube extends ModelBase
|
|||
ModelRenderer Frame3;
|
||||
ModelRenderer Frame2;
|
||||
ModelRenderer Frame1;
|
||||
ModelRenderer Connection;
|
||||
ModelRenderer HoriPole1;
|
||||
ModelRenderer HoriPole2;
|
||||
ModelRenderer HoriPole3;
|
||||
|
@ -27,7 +28,7 @@ public class ModelEnergyCube extends ModelBase
|
|||
ModelRenderer HoriPole7;
|
||||
ModelRenderer HoriPole8;
|
||||
|
||||
public ModelEnergyCube()
|
||||
public ModelEnergyCube()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
@ -104,6 +105,12 @@ public class ModelEnergyCube extends ModelBase
|
|||
Frame1.setTextureSize(64, 64);
|
||||
Frame1.mirror = true;
|
||||
setRotation(Frame1, 0F, 0F, 0F);
|
||||
Connection = new ModelRenderer(this, 0, 7);
|
||||
Connection.addBox(0F, 0F, 0F, 10, 6, 1);
|
||||
Connection.setRotationPoint(-5F, 13F, -8F);
|
||||
Connection.setTextureSize(64, 64);
|
||||
Connection.mirror = true;
|
||||
setRotation(Connection, 0F, 0F, 0F);
|
||||
HoriPole1 = new ModelRenderer(this, 27, 0);
|
||||
HoriPole1.addBox(0F, 0F, 0F, 3, 3, 10);
|
||||
HoriPole1.setRotationPoint(5F, 21F, -5F);
|
||||
|
@ -171,6 +178,7 @@ public class ModelEnergyCube extends ModelBase
|
|||
Frame3.render(size);
|
||||
Frame2.render(size);
|
||||
Frame1.render(size);
|
||||
Connection.render(size);
|
||||
HoriPole1.render(size);
|
||||
HoriPole2.render(size);
|
||||
HoriPole3.render(size);
|
||||
|
@ -181,7 +189,7 @@ public class ModelEnergyCube extends ModelBase
|
|||
HoriPole8.render(size);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
|
|
83
common/mekanism/client/model/ModelGasTank.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
package mekanism.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelGasTank extends ModelBase
|
||||
{
|
||||
ModelRenderer Panel1;
|
||||
ModelRenderer Panel2;
|
||||
ModelRenderer Panel3;
|
||||
ModelRenderer Tank;
|
||||
ModelRenderer Panel4;
|
||||
ModelRenderer Top;
|
||||
ModelRenderer Exit;
|
||||
|
||||
public ModelGasTank()
|
||||
{
|
||||
textureWidth = 32;
|
||||
textureHeight = 64;
|
||||
|
||||
Panel1 = new ModelRenderer(this, 0, 22);
|
||||
Panel1.addBox(0F, 0F, 0F, 5, 13, 1);
|
||||
Panel1.setRotationPoint(-2.5F, 11F, 3.5F);
|
||||
Panel1.setTextureSize(32, 64);
|
||||
Panel1.mirror = true;
|
||||
setRotation(Panel1, 0F, 0F, 0F);
|
||||
Panel2 = new ModelRenderer(this, 0, 37);
|
||||
Panel2.addBox(0F, 0F, 0F, 1, 13, 5);
|
||||
Panel2.setRotationPoint(3.5F, 11F, -2.5F);
|
||||
Panel2.setTextureSize(32, 64);
|
||||
Panel2.mirror = true;
|
||||
setRotation(Panel2, 0F, 0F, 0F);
|
||||
Panel3 = new ModelRenderer(this, 0, 22);
|
||||
Panel3.addBox(0F, 0F, 0F, 5, 13, 1);
|
||||
Panel3.setRotationPoint(-2.5F, 11F, -4.5F);
|
||||
Panel3.setTextureSize(32, 64);
|
||||
Panel3.mirror = true;
|
||||
setRotation(Panel3, 0F, 0F, 0F);
|
||||
Tank = new ModelRenderer(this, 0, 0);
|
||||
Tank.addBox(0F, 0F, 0F, 7, 14, 7);
|
||||
Tank.setRotationPoint(-3.5F, 10F, -3.5F);
|
||||
Tank.setTextureSize(32, 64);
|
||||
Tank.mirror = true;
|
||||
setRotation(Tank, 0F, 0F, 0F);
|
||||
Panel4 = new ModelRenderer(this, 0, 37);
|
||||
Panel4.addBox(0F, 0F, 0F, 1, 13, 5);
|
||||
Panel4.setRotationPoint(-4.5F, 11F, -2.5F);
|
||||
Panel4.setTextureSize(32, 64);
|
||||
Panel4.mirror = true;
|
||||
setRotation(Panel4, 0F, 0F, 0F);
|
||||
Top = new ModelRenderer(this, 13, 22);
|
||||
Top.addBox(0F, 0F, 0F, 2, 2, 2);
|
||||
Top.setRotationPoint(-1F, 8F, -1F);
|
||||
Top.setTextureSize(32, 64);
|
||||
Top.mirror = true;
|
||||
setRotation(Top, 0F, 0F, 0F);
|
||||
Exit = new ModelRenderer(this, 22, 22);
|
||||
Exit.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
Exit.setRotationPoint(1F, 8.2F, -0.5F);
|
||||
Exit.setTextureSize(32, 64);
|
||||
Exit.mirror = true;
|
||||
setRotation(Exit, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(float size)
|
||||
{
|
||||
Panel1.render(size);
|
||||
Panel2.render(size);
|
||||
Panel3.render(size);
|
||||
Tank.render(size);
|
||||
Panel4.render(size);
|
||||
Top.render(size);
|
||||
Exit.render(size);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
187
common/mekanism/client/model/ModelObsidianTNT.java
Normal file
|
@ -0,0 +1,187 @@
|
|||
package mekanism.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelObsidianTNT extends ModelBase
|
||||
{
|
||||
ModelRenderer Wick9;
|
||||
ModelRenderer Wick8;
|
||||
ModelRenderer Wick7;
|
||||
ModelRenderer Wick6;
|
||||
ModelRenderer Wick5;
|
||||
ModelRenderer Wick4;
|
||||
ModelRenderer Wick3;
|
||||
ModelRenderer Wick2;
|
||||
ModelRenderer Wick1;
|
||||
ModelRenderer Wooden2;
|
||||
ModelRenderer Wooden1;
|
||||
ModelRenderer Rod1;
|
||||
ModelRenderer Rod2;
|
||||
ModelRenderer Rod3;
|
||||
ModelRenderer Rod4;
|
||||
ModelRenderer Rod5;
|
||||
ModelRenderer Rod6;
|
||||
ModelRenderer Rod7;
|
||||
ModelRenderer Rod8;
|
||||
ModelRenderer Rod9;
|
||||
|
||||
public ModelObsidianTNT()
|
||||
{
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
Wick9 = new ModelRenderer(this, 0, 0);
|
||||
Wick9.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Wick9.setRotationPoint(-0.5F, 9.2F, -0.5F);
|
||||
Wick9.setTextureSize(64, 64);
|
||||
Wick9.mirror = true;
|
||||
setRotation(Wick9, 0F, 0F, 0.2268928F);
|
||||
Wick8 = new ModelRenderer(this, 0, 0);
|
||||
Wick8.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Wick8.setRotationPoint(-0.5F, 9.5F, -5.5F);
|
||||
Wick8.setTextureSize(64, 64);
|
||||
Wick8.mirror = true;
|
||||
setRotation(Wick8, 0F, 0F, -0.2379431F);
|
||||
Wick7 = new ModelRenderer(this, 0, 0);
|
||||
Wick7.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Wick7.setRotationPoint(-0.5F, 9.5F, 4.5F);
|
||||
Wick7.setTextureSize(64, 64);
|
||||
Wick7.mirror = true;
|
||||
setRotation(Wick7, 0F, 0F, -0.2379431F);
|
||||
Wick6 = new ModelRenderer(this, 0, 0);
|
||||
Wick6.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Wick6.setRotationPoint(-5.5F, 9.2F, -5.5F);
|
||||
Wick6.setTextureSize(64, 64);
|
||||
Wick6.mirror = true;
|
||||
setRotation(Wick6, 0F, 0F, 0.2268928F);
|
||||
Wick5 = new ModelRenderer(this, 0, 0);
|
||||
Wick5.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Wick5.setRotationPoint(-5.5F, 9.5F, -0.5F);
|
||||
Wick5.setTextureSize(64, 64);
|
||||
Wick5.mirror = true;
|
||||
setRotation(Wick5, 0F, 0F, -0.2379431F);
|
||||
Wick4 = new ModelRenderer(this, 0, 0);
|
||||
Wick4.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Wick4.setRotationPoint(-5.5F, 9.2F, 4.5F);
|
||||
Wick4.setTextureSize(64, 64);
|
||||
Wick4.mirror = true;
|
||||
setRotation(Wick4, 0F, 0F, 0.2268928F);
|
||||
Wick3 = new ModelRenderer(this, 0, 0);
|
||||
Wick3.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Wick3.setRotationPoint(4.5F, 9.2F, -5.5F);
|
||||
Wick3.setTextureSize(64, 64);
|
||||
Wick3.mirror = true;
|
||||
setRotation(Wick3, 0F, 0F, 0.2268928F);
|
||||
Wick2 = new ModelRenderer(this, 0, 0);
|
||||
Wick2.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Wick2.setRotationPoint(4.5F, 9.5F, -0.5F);
|
||||
Wick2.setTextureSize(64, 64);
|
||||
Wick2.mirror = true;
|
||||
setRotation(Wick2, 0F, 0F, -0.2379431F);
|
||||
Wick1 = new ModelRenderer(this, 0, 0);
|
||||
Wick1.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Wick1.setRotationPoint(4.5F, 9.2F, 4.5F);
|
||||
Wick1.setTextureSize(64, 64);
|
||||
Wick1.mirror = true;
|
||||
setRotation(Wick1, 0F, 0F, 0.2268928F);
|
||||
Wooden2 = new ModelRenderer(this, 0, 0);
|
||||
Wooden2.addBox(0F, 0F, 0F, 16, 3, 16);
|
||||
Wooden2.setRotationPoint(-8F, 12F, -8F);
|
||||
Wooden2.setTextureSize(64, 64);
|
||||
Wooden2.mirror = true;
|
||||
setRotation(Wooden2, 0F, 0F, 0F);
|
||||
Wooden1 = new ModelRenderer(this, 0, 0);
|
||||
Wooden1.addBox(0F, 0F, 0F, 16, 3, 16);
|
||||
Wooden1.setRotationPoint(-8F, 20F, -8F);
|
||||
Wooden1.setTextureSize(64, 64);
|
||||
Wooden1.mirror = true;
|
||||
setRotation(Wooden1, 0F, 0F, 0F);
|
||||
Rod1 = new ModelRenderer(this, 0, 20);
|
||||
Rod1.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
Rod1.setRotationPoint(3F, 11F, 3F);
|
||||
Rod1.setTextureSize(64, 64);
|
||||
Rod1.mirror = true;
|
||||
setRotation(Rod1, 0F, 0F, 0F);
|
||||
Rod2 = new ModelRenderer(this, 0, 20);
|
||||
Rod2.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
Rod2.setRotationPoint(3F, 11F, -2F);
|
||||
Rod2.setTextureSize(64, 64);
|
||||
Rod2.mirror = true;
|
||||
setRotation(Rod2, 0F, 0F, 0F);
|
||||
Rod3 = new ModelRenderer(this, 0, 20);
|
||||
Rod3.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
Rod3.setRotationPoint(3F, 11F, -7F);
|
||||
Rod3.setTextureSize(64, 64);
|
||||
Rod3.mirror = true;
|
||||
setRotation(Rod3, 0F, 0F, 0F);
|
||||
Rod4 = new ModelRenderer(this, 0, 20);
|
||||
Rod4.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
Rod4.setRotationPoint(-2F, 11F, -7F);
|
||||
Rod4.setTextureSize(64, 64);
|
||||
Rod4.mirror = true;
|
||||
setRotation(Rod4, 0F, 0F, 0F);
|
||||
Rod5 = new ModelRenderer(this, 0, 20);
|
||||
Rod5.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
Rod5.setRotationPoint(-2F, 11F, -2F);
|
||||
Rod5.setTextureSize(64, 64);
|
||||
Rod5.mirror = true;
|
||||
setRotation(Rod5, 0F, 0F, 0F);
|
||||
Rod6 = new ModelRenderer(this, 0, 20);
|
||||
Rod6.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
Rod6.setRotationPoint(-2F, 11F, 3F);
|
||||
Rod6.setTextureSize(64, 64);
|
||||
Rod6.mirror = true;
|
||||
setRotation(Rod6, 0F, 0F, 0F);
|
||||
Rod7 = new ModelRenderer(this, 0, 20);
|
||||
Rod7.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
Rod7.setRotationPoint(-7F, 11F, -2F);
|
||||
Rod7.setTextureSize(64, 64);
|
||||
Rod7.mirror = true;
|
||||
setRotation(Rod7, 0F, 0F, 0F);
|
||||
Rod8 = new ModelRenderer(this, 0, 20);
|
||||
Rod8.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
Rod8.setRotationPoint(-7F, 11F, 3F);
|
||||
Rod8.setTextureSize(64, 64);
|
||||
Rod8.mirror = true;
|
||||
setRotation(Rod8, 0F, 0F, 0F);
|
||||
Rod9 = new ModelRenderer(this, 0, 20);
|
||||
Rod9.addBox(0F, 0F, 0F, 4, 13, 4);
|
||||
Rod9.setRotationPoint(-7F, 11F, -7F);
|
||||
Rod9.setTextureSize(64, 64);
|
||||
Rod9.mirror = true;
|
||||
setRotation(Rod9, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(float size)
|
||||
{
|
||||
Wick9.render(size);
|
||||
Wick8.render(size);
|
||||
Wick7.render(size);
|
||||
Wick6.render(size);
|
||||
Wick5.render(size);
|
||||
Wick4.render(size);
|
||||
Wick3.render(size);
|
||||
Wick2.render(size);
|
||||
Wick1.render(size);
|
||||
Wooden2.render(size);
|
||||
Wooden1.render(size);
|
||||
Rod1.render(size);
|
||||
Rod2.render(size);
|
||||
Rod3.render(size);
|
||||
Rod4.render(size);
|
||||
Rod5.render(size);
|
||||
Rod6.render(size);
|
||||
Rod7.render(size);
|
||||
Rod8.render(size);
|
||||
Rod9.render(size);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@ package mekanism.client.render.block;
|
|||
|
||||
import mekanism.client.ClientProxy;
|
||||
import mekanism.client.model.ModelChargepad;
|
||||
import mekanism.client.model.ModelCrusher;
|
||||
import mekanism.client.model.ModelElectricPump;
|
||||
import mekanism.client.model.ModelLogisticalSorter;
|
||||
import mekanism.client.model.ModelMetallurgicInfuser;
|
||||
|
@ -28,6 +29,7 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
|
|||
public ModelMetallurgicInfuser metallurgicInfuser = new ModelMetallurgicInfuser();
|
||||
public ModelChargepad chargepad = new ModelChargepad();
|
||||
public ModelLogisticalSorter logisticalSorter = new ModelLogisticalSorter();
|
||||
public ModelCrusher crusher = new ModelCrusher();
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
|
@ -73,6 +75,14 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
|
|||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LogisticalSorter.png"));
|
||||
logisticalSorter.render(0.0625F, false);
|
||||
}
|
||||
else if(metadata == MachineType.CRUSHER.meta)
|
||||
{
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Crusher.png"));
|
||||
crusher.render(0.0625F, 0.0F);
|
||||
}
|
||||
else {
|
||||
MekanismRenderer.renderItem(renderer, metadata, block);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
package mekanism.client.render.entity;
|
||||
|
||||
import mekanism.client.model.ModelObsidianTNT;
|
||||
import mekanism.common.EntityObsidianTNT;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.src.FMLRenderAccessLibrary;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -14,11 +18,12 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RenderObsidianTNT extends Render
|
||||
public class RenderObsidianTNTPrimed extends Render
|
||||
{
|
||||
private RenderBlocks blockRenderer = new RenderBlocks();
|
||||
private ModelObsidianTNT model = new ModelObsidianTNT();
|
||||
|
||||
public RenderObsidianTNT()
|
||||
public RenderObsidianTNTPrimed()
|
||||
{
|
||||
shadowSize = 0.5F;
|
||||
}
|
||||
|
@ -32,7 +37,7 @@ public class RenderObsidianTNT extends Render
|
|||
public void renderObsidianTNT(EntityObsidianTNT entityobsidiantnt, double x, double y, double z, float f, float f1)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
GL11.glTranslatef((float)x, (float)y-1.2f, (float)z);
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
|
||||
if((entityobsidiantnt.fuse - f1) + 1.0F < 10F)
|
||||
|
@ -56,8 +61,8 @@ public class RenderObsidianTNT extends Render
|
|||
}
|
||||
|
||||
float f3 = (1.0F - ((entityobsidiantnt.fuse - f1) + 1.0F) / 100F) * 0.8F;
|
||||
bindEntityTexture(entityobsidiantnt);
|
||||
blockRenderer.renderBlockAsItem(Mekanism.ObsidianTNT, 0, entityobsidiantnt.getBrightness(f1));
|
||||
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ObsidianTNT.png"));
|
||||
model.render(0.0625F);
|
||||
|
||||
if(entityobsidiantnt.fuse / 5 % 2 == 0)
|
||||
{
|
||||
|
@ -66,7 +71,7 @@ public class RenderObsidianTNT extends Render
|
|||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, f3);
|
||||
blockRenderer.renderBlockAsItem(Mekanism.ObsidianTNT, 0, 1.0F);
|
||||
model.render(0.0625F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
|
@ -6,6 +6,8 @@ import mekanism.client.ClientProxy;
|
|||
import mekanism.client.MekanismClient;
|
||||
import mekanism.client.model.ModelEnergyCube;
|
||||
import mekanism.client.model.ModelEnergyCube.ModelEnergyCore;
|
||||
import mekanism.client.model.ModelGasTank;
|
||||
import mekanism.client.model.ModelObsidianTNT;
|
||||
import mekanism.client.model.ModelRobit;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.IElectricChest;
|
||||
|
@ -38,6 +40,8 @@ public class ItemRenderingHandler implements IItemRenderer
|
|||
public ModelChest electricChest = new ModelChest();
|
||||
public ModelEnergyCube energyCube = new ModelEnergyCube();
|
||||
public ModelEnergyCore energyCore = new ModelEnergyCore();
|
||||
public ModelGasTank gasTank = new ModelGasTank();
|
||||
public ModelObsidianTNT obsidianTNT = new ModelObsidianTNT();
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
|
@ -106,6 +110,22 @@ public class ItemRenderingHandler implements IItemRenderer
|
|||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if(item.itemID == Mekanism.gasTankID)
|
||||
{
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "GasTank.png"));
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
gasTank.render(0.0625F);
|
||||
}
|
||||
else if(item.itemID == Mekanism.obsidianTNTID)
|
||||
{
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ObsidianTNT.png"));
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(180F, 0.0F, -1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.0F);
|
||||
obsidianTNT.render(0.0625F);
|
||||
}
|
||||
else if(item.getItem() instanceof ItemWalkieTalkie)
|
||||
{
|
||||
if(((ItemWalkieTalkie)item.getItem()).getOn(item))
|
||||
|
|
40
common/mekanism/client/render/tileentity/RenderCrusher.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package mekanism.client.render.tileentity;
|
||||
|
||||
import mekanism.client.model.ModelCrusher;
|
||||
import mekanism.common.tileentity.TileEntityCrusher;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderCrusher extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelCrusher model = new ModelCrusher();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
renderAModelAt((TileEntityCrusher)tileEntity, x, y, z, 1F);
|
||||
}
|
||||
|
||||
private void renderAModelAt(TileEntityCrusher tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
|
||||
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Crusher.png"));
|
||||
|
||||
switch(tileEntity.facing)
|
||||
{
|
||||
case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
|
||||
case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
|
||||
case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
|
||||
case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
|
||||
}
|
||||
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
model.render(0.0625F, tileEntity.isActive ? tileEntity.getMatrix() : 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -36,6 +36,14 @@ public class RenderEnergyCube extends TileEntitySpecialRenderer
|
|||
|
||||
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "EnergyCube" + tileEntity.tier.name + ".png"));
|
||||
|
||||
switch(tileEntity.facing)
|
||||
{
|
||||
case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
|
||||
case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
|
||||
case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
|
||||
case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
|
||||
}
|
||||
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
|
40
common/mekanism/client/render/tileentity/RenderGasTank.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package mekanism.client.render.tileentity;
|
||||
|
||||
import mekanism.client.model.ModelGasTank;
|
||||
import mekanism.common.tileentity.TileEntityGasTank;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderGasTank extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelGasTank model = new ModelGasTank();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
renderAModelAt((TileEntityGasTank)tileEntity, x, y, z, 1F);
|
||||
}
|
||||
|
||||
private void renderAModelAt(TileEntityGasTank tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
|
||||
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "GasTank.png"));
|
||||
|
||||
switch(tileEntity.facing)
|
||||
{
|
||||
case 2: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
|
||||
case 3: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
|
||||
case 4: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
|
||||
case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
|
||||
}
|
||||
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package mekanism.client.render.tileentity;
|
||||
|
||||
import mekanism.client.model.ModelObsidianTNT;
|
||||
import mekanism.common.tileentity.TileEntityObsidianTNT;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderObsidianTNT extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelObsidianTNT model = new ModelObsidianTNT();
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
renderAModelAt((TileEntityObsidianTNT)tileEntity, x, y, z, 1F);
|
||||
}
|
||||
|
||||
private void renderAModelAt(TileEntityObsidianTNT tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
|
||||
|
||||
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "ObsidianTNT.png"));
|
||||
|
||||
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||
model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -75,6 +75,7 @@ public class CommonProxy
|
|||
GameRegistry.registerTileEntity(TileEntityPurificationChamber.class, "PurificationChamber");
|
||||
GameRegistry.registerTileEntity(TileEntityEnergizedSmelter.class, "EnergizedSmelter");
|
||||
GameRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser");
|
||||
GameRegistry.registerTileEntity(TileEntityGasTank.class, "GasTank");
|
||||
GameRegistry.registerTileEntity(TileEntityEnergyCube.class, "EnergyCube");
|
||||
GameRegistry.registerTileEntity(TileEntityPressurizedTube.class, "PressurizedTube");
|
||||
GameRegistry.registerTileEntity(TileEntityUniversalCable.class, "UniversalCable");
|
||||
|
|
|
@ -1003,7 +1003,6 @@ public class Mekanism
|
|||
|
||||
//Tile entities
|
||||
GameRegistry.registerTileEntity(TileEntityBoundingBlock.class, "BoundingBlock");
|
||||
GameRegistry.registerTileEntity(TileEntityGasTank.class, "GasTank");
|
||||
GameRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter");
|
||||
|
||||
//Load tile entities that have special renderers.
|
||||
|
|
|
@ -28,7 +28,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class BlockGasTank extends BlockContainer
|
||||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
public Random machineRand = new Random();
|
||||
|
||||
public BlockGasTank(int id)
|
||||
|
@ -42,12 +41,7 @@ public class BlockGasTank extends BlockContainer
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister register)
|
||||
{
|
||||
icons[0] = register.registerIcon("mekanism:GasTankTop");
|
||||
icons[1] = register.registerIcon("mekanism:GasTankSide");
|
||||
icons[2] = register.registerIcon("mekanism:GasTankFront");
|
||||
}
|
||||
public void registerIcons(IconRegister register) {}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack itemstack)
|
||||
|
@ -67,42 +61,6 @@ public class BlockGasTank extends BlockContainer
|
|||
|
||||
tileEntity.setFacing((short)change);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int side, int meta)
|
||||
{
|
||||
if(side == 3)
|
||||
{
|
||||
return icons[2];
|
||||
}
|
||||
else if(side == 0 || side == 1)
|
||||
{
|
||||
return icons[0];
|
||||
}
|
||||
else {
|
||||
return icons[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if(side == tileEntity.facing)
|
||||
{
|
||||
return icons[2];
|
||||
}
|
||||
else if(side == 0 || side == 1)
|
||||
{
|
||||
return icons[0];
|
||||
}
|
||||
else {
|
||||
return icons[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, int i1, int i2)
|
||||
|
@ -250,6 +208,12 @@ public class BlockGasTank extends BlockContainer
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world)
|
||||
{
|
||||
|
|
|
@ -188,7 +188,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
{
|
||||
TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if(MekanismUtils.isActive(world, x, y, z) && !(tileEntity instanceof TileEntityChargepad) && !(tileEntity instanceof TileEntityLogisticalSorter))
|
||||
if(MekanismUtils.isActive(world, x, y, z) && !(tileEntity instanceof TileEntityChargepad) && !(tileEntity instanceof TileEntityLogisticalSorter) && !(tileEntity instanceof TileEntityCrusher))
|
||||
{
|
||||
float xRandom = (float)x + 0.5F;
|
||||
float yRandom = (float)y + 0.0F + random.nextFloat() * 6.0F / 16.0F;
|
||||
|
@ -858,7 +858,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
ENRICHMENT_CHAMBER(0, "EnrichmentChamber", 3, Mekanism.enrichmentChamberUsage*400, TileEntityEnrichmentChamber.class, false),
|
||||
OSMIUM_COMPRESSOR(1, "OsmiumCompressor", 4, Mekanism.osmiumCompressorUsage*400, TileEntityOsmiumCompressor.class, false),
|
||||
COMBINER(2, "Combiner", 5, Mekanism.combinerUsage*400, TileEntityCombiner.class, false),
|
||||
CRUSHER(3, "Crusher", 6, Mekanism.crusherUsage*400, TileEntityCrusher.class, false),
|
||||
CRUSHER(3, "Crusher", 6, Mekanism.crusherUsage*400, TileEntityCrusher.class, true),
|
||||
BASIC_FACTORY(5, "BasicFactory", 11, Mekanism.factoryUsage*3*400, TileEntityFactory.class, false),
|
||||
ADVANCED_FACTORY(6, "AdvancedFactory", 11, Mekanism.factoryUsage*5*400, TileEntityAdvancedFactory.class, false),
|
||||
ELITE_FACTORY(7, "EliteFactory", 11, Mekanism.factoryUsage*7*400, TileEntityEliteFactory.class, false),
|
||||
|
|
|
@ -2,6 +2,7 @@ package mekanism.common.block;
|
|||
|
||||
import mekanism.common.EntityObsidianTNT;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.tileentity.TileEntityObsidianTNT;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
@ -9,7 +10,7 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -115,6 +116,36 @@ public class BlockObsidianTNT extends Block
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(int metadata)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, int metadata)
|
||||
{
|
||||
return new TileEntityObsidianTNT();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
|
|
|
@ -216,6 +216,11 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
|||
@Override
|
||||
public double injectEnergyUnits(ForgeDirection direction, double i)
|
||||
{
|
||||
if(Object3D.get(this).getFromSide(direction).getTileEntity(worldObj) instanceof TileEntityUniversalCable)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
double givenEnergy = i*Mekanism.FROM_IC2;
|
||||
double rejects = 0;
|
||||
double neededEnergy = getMaxEnergy()-getEnergy();
|
||||
|
|
|
@ -9,11 +9,43 @@ import mekanism.common.block.BlockMachine.MachineType;
|
|||
|
||||
public class TileEntityCrusher extends TileEntityElectricMachine
|
||||
{
|
||||
public float crushMatrix = 0;
|
||||
|
||||
public TileEntityCrusher()
|
||||
{
|
||||
super("Crusher.ogg", "Crusher", new ResourceLocation("mekanism", "gui/GuiCrusher.png"), Mekanism.crusherUsage, 200, MachineType.CRUSHER.baseEnergy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
if(crushMatrix < 6)
|
||||
{
|
||||
crushMatrix+=0.2F;
|
||||
}
|
||||
else {
|
||||
crushMatrix = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float getMatrix()
|
||||
{
|
||||
float matrix = 0;
|
||||
|
||||
if(crushMatrix <= 3)
|
||||
{
|
||||
return crushMatrix;
|
||||
}
|
||||
else {
|
||||
return 3 - (crushMatrix-3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map getRecipes()
|
||||
{
|
||||
|
|
|
@ -11,7 +11,6 @@ import java.util.HashSet;
|
|||
import mekanism.api.Object3D;
|
||||
import mekanism.api.energy.ICableOutputter;
|
||||
import mekanism.api.energy.IStrictEnergyAcceptor;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.common.IRedstoneControl;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.Tier.EnergyCubeTier;
|
||||
|
@ -23,13 +22,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.core.block.IConductor;
|
||||
import universalelectricity.core.electricity.ElectricityHelper;
|
||||
import universalelectricity.core.electricity.ElectricityPack;
|
||||
import universalelectricity.core.grid.IElectricityNetwork;
|
||||
import buildcraft.api.power.IPowerReceptor;
|
||||
import buildcraft.api.power.PowerHandler.PowerReceiver;
|
||||
import buildcraft.api.power.PowerHandler.Type;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
|
@ -121,7 +114,7 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IEn
|
|||
@Override
|
||||
public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction)
|
||||
{
|
||||
return direction != ForgeDirection.getOrientation(facing);
|
||||
return direction != getOutputtingSide();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -163,6 +156,11 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IEn
|
|||
@Override
|
||||
public double injectEnergyUnits(ForgeDirection direction, double i)
|
||||
{
|
||||
if(Object3D.get(this).getFromSide(direction).getTileEntity(worldObj) instanceof TileEntityUniversalCable)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
double givenEnergy = i*Mekanism.FROM_IC2;
|
||||
double rejects = 0;
|
||||
double neededEnergy = getMaxEnergy()-getEnergy();
|
||||
|
@ -201,13 +199,13 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IEn
|
|||
@Override
|
||||
public boolean canReceiveEnergy(ForgeDirection side)
|
||||
{
|
||||
return side != ForgeDirection.getOrientation(facing);
|
||||
return side != getOutputtingSide();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean emitsEnergyTo(TileEntity receiver, ForgeDirection direction)
|
||||
{
|
||||
return direction == ForgeDirection.getOrientation(facing);
|
||||
return direction == getOutputtingSide() && !(receiver instanceof TileEntityUniversalCable);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -356,13 +354,13 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IEn
|
|||
@Override
|
||||
public boolean isTeleporterCompatible(ForgeDirection side)
|
||||
{
|
||||
return true;
|
||||
return side == getOutputtingSide();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canOutputTo(ForgeDirection side)
|
||||
{
|
||||
return side == ForgeDirection.getOrientation(facing);
|
||||
return side == getOutputtingSide();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -201,7 +201,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IEnerg
|
|||
|
||||
for(int process = 0; process < tier.processes; process++)
|
||||
{
|
||||
if(MekanismUtils.canFunction(this) && canOperate(getInputSlot(process), getOutputSlot(process)) && electricityStored >= MekanismUtils.getEnergyPerTick(getSpeedMultiplier(), getEnergyMultiplier(), ENERGY_PER_TICK))
|
||||
if(MekanismUtils.canFunction(this) && canOperate(getInputSlot(process), getOutputSlot(process)) && getEnergy() >= MekanismUtils.getEnergyPerTick(getSpeedMultiplier(), getEnergyMultiplier(), ENERGY_PER_TICK))
|
||||
{
|
||||
if((progress[process]+1) < MekanismUtils.getTicks(getSpeedMultiplier(), TICKS_REQUIRED))
|
||||
{
|
||||
|
@ -658,6 +658,11 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IEnerg
|
|||
@Override
|
||||
public double injectEnergyUnits(ForgeDirection direction, double i)
|
||||
{
|
||||
if(Object3D.get(this).getFromSide(direction).getTileEntity(worldObj) instanceof TileEntityUniversalCable)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
double givenEnergy = i*Mekanism.FROM_IC2;
|
||||
double rejects = 0;
|
||||
double neededEnergy = getMaxEnergy()-getEnergy();
|
||||
|
|
|
@ -35,6 +35,8 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
|
||||
public EnumColor color;
|
||||
|
||||
public boolean autoEject;
|
||||
|
||||
public final int MAX_DELAY = 10;
|
||||
|
||||
public int delayTicks;
|
||||
|
@ -80,6 +82,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
|
||||
if(inInventory != null && inInventory.itemStack != null)
|
||||
{
|
||||
boolean hasFilter = false;
|
||||
EnumColor filterColor = color;
|
||||
|
||||
for(TransporterFilter filter : filters)
|
||||
|
@ -87,11 +90,12 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
if(filter.canFilter(inInventory.itemStack))
|
||||
{
|
||||
filterColor = filter.color;
|
||||
hasFilter = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(TransporterUtils.insert(this, transporter, inInventory.itemStack, filterColor))
|
||||
if((hasFilter || autoEject) && TransporterUtils.insert(this, transporter, inInventory.itemStack, filterColor))
|
||||
{
|
||||
inventory.setInventorySlotContents(inInventory.slotID, null);
|
||||
setActive(true);
|
||||
|
@ -127,6 +131,8 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
nbtTags.setInteger("color", TransporterUtils.colors.indexOf(color));
|
||||
}
|
||||
|
||||
nbtTags.setBoolean("autoEject", autoEject);
|
||||
|
||||
NBTTagList filterTags = new NBTTagList();
|
||||
|
||||
for(TransporterFilter filter : filters)
|
||||
|
@ -154,6 +160,8 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
color = TransporterUtils.colors.get(nbtTags.getInteger("color"));
|
||||
}
|
||||
|
||||
autoEject = nbtTags.getBoolean("autoEject");
|
||||
|
||||
if(nbtTags.hasKey("filters"))
|
||||
{
|
||||
NBTTagList tagList = nbtTags.getTagList("filters");
|
||||
|
@ -170,10 +178,16 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(dataStream.readInt() == 0)
|
||||
int type = dataStream.readInt();
|
||||
|
||||
if(type == 0)
|
||||
{
|
||||
color = TransporterUtils.increment(color);
|
||||
}
|
||||
else if(type == 1)
|
||||
{
|
||||
autoEject = !autoEject;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -197,6 +211,8 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
color = null;
|
||||
}
|
||||
|
||||
autoEject = dataStream.readBoolean();
|
||||
|
||||
filters.clear();
|
||||
|
||||
int amount = dataStream.readInt();
|
||||
|
@ -223,6 +239,8 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
color = null;
|
||||
}
|
||||
|
||||
autoEject = dataStream.readBoolean();
|
||||
|
||||
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
|
||||
}
|
||||
else if(type == 2)
|
||||
|
@ -256,6 +274,8 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
data.add(-1);
|
||||
}
|
||||
|
||||
data.add(autoEject);
|
||||
|
||||
data.add(filters.size());
|
||||
|
||||
for(TransporterFilter filter : filters)
|
||||
|
@ -283,6 +303,8 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
data.add(-1);
|
||||
}
|
||||
|
||||
data.add(autoEject);
|
||||
|
||||
return data;
|
||||
|
||||
}
|
||||
|
|
|
@ -562,6 +562,11 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
|||
@Override
|
||||
public double injectEnergyUnits(ForgeDirection direction, double i)
|
||||
{
|
||||
if(Object3D.get(this).getFromSide(direction).getTileEntity(worldObj) instanceof TileEntityUniversalCable)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
double givenEnergy = i*Mekanism.FROM_IC2;
|
||||
double rejects = 0;
|
||||
double neededEnergy = getMaxEnergy()-getEnergy();
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
package mekanism.common.tileentity;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
//For a TESR
|
||||
public class TileEntityObsidianTNT extends TileEntity {}
|
|
@ -466,8 +466,13 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IEn
|
|||
}
|
||||
|
||||
@Override
|
||||
public double injectEnergyUnits(ForgeDirection directionFrom, double amount)
|
||||
public double injectEnergyUnits(ForgeDirection direction, double amount)
|
||||
{
|
||||
if(Object3D.get(this).getFromSide(direction).getTileEntity(worldObj) instanceof TileEntityUniversalCable)
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
|
||||
double givenEnergy = amount*Mekanism.FROM_IC2;
|
||||
double rejects = 0;
|
||||
double neededEnergy = getMaxEnergy()-getEnergy();
|
||||
|
|
|
@ -18,6 +18,7 @@ import mekanism.common.Mekanism;
|
|||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.tileentity.TileEntityElectricBlock;
|
||||
import mekanism.common.tileentity.TileEntityUniversalCable;
|
||||
import mekanism.common.util.ChargeUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
|
@ -454,8 +455,13 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
|
|||
@Override
|
||||
public double injectEnergyUnits(ForgeDirection direction, double i)
|
||||
{
|
||||
if(Object3D.get(this).getFromSide(direction).getTileEntity(worldObj) instanceof TileEntityUniversalCable)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
double rejects = 0;
|
||||
double neededEnergy = MAX_ELECTRICITY-electricityStored;
|
||||
double neededEnergy = getMaxEnergy()-getEnergy();
|
||||
|
||||
if(i <= neededEnergy)
|
||||
{
|
||||
|
|
|
@ -17,6 +17,7 @@ import mekanism.common.PacketHandler;
|
|||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tileentity.TileEntityElectricBlock;
|
||||
import mekanism.common.tileentity.TileEntityUniversalCable;
|
||||
import mekanism.common.util.CableUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
|
@ -208,7 +209,7 @@ public abstract class TileEntityGenerator extends TileEntityElectricBlock implem
|
|||
@Override
|
||||
public boolean emitsEnergyTo(TileEntity receiver, ForgeDirection direction)
|
||||
{
|
||||
return getOutputtingSide() == direction;
|
||||
return direction == getOutputtingSide() && !(receiver instanceof TileEntityUniversalCable);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.6 KiB |
BIN
resources/assets/mekanism/render/Crusher.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
resources/assets/mekanism/render/GasTank.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
resources/assets/mekanism/render/ObsidianTNT.png
Normal file
After Width: | Height: | Size: 2.9 KiB |