Sorter no longer requires energy, gave sorter new fancy model, improved the way items retreat from dead ends
This commit is contained in:
parent
c281fcb14b
commit
8db9c734d7
20 changed files with 339 additions and 325 deletions
|
@ -43,6 +43,7 @@ import mekanism.client.render.tileentity.RenderConfigurableMachine;
|
||||||
import mekanism.client.render.tileentity.RenderDynamicTank;
|
import mekanism.client.render.tileentity.RenderDynamicTank;
|
||||||
import mekanism.client.render.tileentity.RenderElectricChest;
|
import mekanism.client.render.tileentity.RenderElectricChest;
|
||||||
import mekanism.client.render.tileentity.RenderElectricPump;
|
import mekanism.client.render.tileentity.RenderElectricPump;
|
||||||
|
import mekanism.client.render.tileentity.RenderLogisticalSorter;
|
||||||
import mekanism.client.render.tileentity.RenderLogisticalTransporter;
|
import mekanism.client.render.tileentity.RenderLogisticalTransporter;
|
||||||
import mekanism.client.render.tileentity.RenderMechanicalPipe;
|
import mekanism.client.render.tileentity.RenderMechanicalPipe;
|
||||||
import mekanism.client.render.tileentity.RenderMetallurgicInfuser;
|
import mekanism.client.render.tileentity.RenderMetallurgicInfuser;
|
||||||
|
@ -73,6 +74,7 @@ import mekanism.common.tileentity.TileEntityEnergyCube;
|
||||||
import mekanism.common.tileentity.TileEntityEnrichmentChamber;
|
import mekanism.common.tileentity.TileEntityEnrichmentChamber;
|
||||||
import mekanism.common.tileentity.TileEntityFactory;
|
import mekanism.common.tileentity.TileEntityFactory;
|
||||||
import mekanism.common.tileentity.TileEntityGasTank;
|
import mekanism.common.tileentity.TileEntityGasTank;
|
||||||
|
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||||
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||||
import mekanism.common.tileentity.TileEntityMechanicalPipe;
|
import mekanism.common.tileentity.TileEntityMechanicalPipe;
|
||||||
import mekanism.common.tileentity.TileEntityMetallurgicInfuser;
|
import mekanism.common.tileentity.TileEntityMetallurgicInfuser;
|
||||||
|
@ -232,6 +234,7 @@ public class ClientProxy extends CommonProxy
|
||||||
ClientRegistry.registerTileEntity(TileEntityDynamicValve.class, "DynamicValve", new RenderDynamicTank());
|
ClientRegistry.registerTileEntity(TileEntityDynamicValve.class, "DynamicValve", new RenderDynamicTank());
|
||||||
ClientRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad", new RenderChargepad());
|
ClientRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad", new RenderChargepad());
|
||||||
ClientRegistry.registerTileEntity(TileEntityLogisticalTransporter.class, "LogisticalTransporter", new RenderLogisticalTransporter());
|
ClientRegistry.registerTileEntity(TileEntityLogisticalTransporter.class, "LogisticalTransporter", new RenderLogisticalTransporter());
|
||||||
|
ClientRegistry.registerTileEntity(TileEntityLogisticalSorter.class, "LogisticalSorter", new RenderLogisticalSorter());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -249,9 +249,6 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||||
fontRenderer.drawString("IS: " + getItemStackFilters().size(), 11, 37, 0x00CD00);
|
fontRenderer.drawString("IS: " + getItemStackFilters().size(), 11, 37, 0x00CD00);
|
||||||
fontRenderer.drawString("OD: " + getOreDictFilters().size(), 11, 46, 0x00CD00);
|
fontRenderer.drawString("OD: " + getOreDictFilters().size(), 11, 46, 0x00CD00);
|
||||||
|
|
||||||
fontRenderer.drawString("Energy:", 11, 58, 0x00CD00);
|
|
||||||
fontRenderer.drawString((int)(((float)tileEntity.getEnergy()/tileEntity.getMaxEnergy())*100) + "%", 11, 67, 0x00CD00);
|
|
||||||
|
|
||||||
fontRenderer.drawString("Default:", 12, 126, 0x00CD00);
|
fontRenderer.drawString("Default:", 12, 126, 0x00CD00);
|
||||||
|
|
||||||
for(int i = 0; i < 4; i++)
|
for(int i = 0; i < 4; i++)
|
||||||
|
|
|
@ -52,18 +52,6 @@ public class ModelChargepad extends ModelBase
|
||||||
setRotation(Shape5, 0F, 0F, 0F);
|
setRotation(Shape5, 0F, 0F, 0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
|
||||||
{
|
|
||||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
|
||||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
|
||||||
Shape1.render(f5);
|
|
||||||
Shape2.render(f5);
|
|
||||||
Shape3.render(f5);
|
|
||||||
Shape4.render(f5);
|
|
||||||
Shape5.render(f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void render(float size)
|
public void render(float size)
|
||||||
{
|
{
|
||||||
Shape1.render(size);
|
Shape1.render(size);
|
||||||
|
|
|
@ -157,30 +157,6 @@ public class ModelElectricPump extends ModelBase
|
||||||
DISPLAY1.render(size);
|
DISPLAY1.render(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
|
||||||
{
|
|
||||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
|
||||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
|
||||||
COREBOX.render(f5);
|
|
||||||
INPUTSLOT2.render(f5);
|
|
||||||
INPUTSLOT3.render(f5);
|
|
||||||
INPUTSLOT4.render(f5);
|
|
||||||
INPUTSLOT5.render(f5);
|
|
||||||
INPUTSLOT1.render(f5);
|
|
||||||
PIPE3.render(f5);
|
|
||||||
PIPE2.render(f5);
|
|
||||||
TOPPIPE3.render(f5);
|
|
||||||
PIPE1.render(f5);
|
|
||||||
CORESLOT.render(f5);
|
|
||||||
PIPE4.render(f5);
|
|
||||||
TOPPIPE2.render(f5);
|
|
||||||
DISPLAY2.render(f5);
|
|
||||||
TOPPIPE1.render(f5);
|
|
||||||
TOPPIPE4.render(f5);
|
|
||||||
DISPLAY1.render(f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
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.rotateAngleX = x;
|
||||||
|
|
227
common/mekanism/client/model/ModelLogisticalSorter.java
Normal file
227
common/mekanism/client/model/ModelLogisticalSorter.java
Normal file
|
@ -0,0 +1,227 @@
|
||||||
|
package mekanism.client.model;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ModelBase;
|
||||||
|
import net.minecraft.client.model.ModelRenderer;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
public class ModelLogisticalSorter extends ModelBase
|
||||||
|
{
|
||||||
|
ModelRenderer LeftThing;
|
||||||
|
ModelRenderer RightThing;
|
||||||
|
ModelRenderer BottomPlate;
|
||||||
|
ModelRenderer TopPlate;
|
||||||
|
ModelRenderer LeftPlate;
|
||||||
|
ModelRenderer RightPlate;
|
||||||
|
ModelRenderer BR1Block1;
|
||||||
|
ModelRenderer BL1Block1;
|
||||||
|
ModelRenderer TL1Block1;
|
||||||
|
ModelRenderer TR1Block1;
|
||||||
|
ModelRenderer BR1Block2;
|
||||||
|
ModelRenderer BL1Block2;
|
||||||
|
ModelRenderer TL1Block2;
|
||||||
|
ModelRenderer TR1Block2;
|
||||||
|
ModelRenderer PoleBR;
|
||||||
|
ModelRenderer PoleTL;
|
||||||
|
ModelRenderer PoleTR;
|
||||||
|
ModelRenderer PoleBL;
|
||||||
|
ModelRenderer InjectorTL;
|
||||||
|
ModelRenderer InjectorBR;
|
||||||
|
ModelRenderer InjectorTR;
|
||||||
|
ModelRenderer InjectorBL;
|
||||||
|
ModelRenderer Base;
|
||||||
|
ModelRenderer PipeBase;
|
||||||
|
ModelRenderer DecorPlate;
|
||||||
|
|
||||||
|
public ModelLogisticalSorter()
|
||||||
|
{
|
||||||
|
textureWidth = 128;
|
||||||
|
textureHeight = 64;
|
||||||
|
|
||||||
|
LeftThing = new ModelRenderer(this, 0, 29);
|
||||||
|
LeftThing.addBox(0F, 0F, 0F, 1, 12, 1);
|
||||||
|
LeftThing.setRotationPoint(5.5F, 10F, 5F);
|
||||||
|
LeftThing.setTextureSize(128, 64);
|
||||||
|
LeftThing.mirror = true;
|
||||||
|
setRotation(LeftThing, 0F, 0F, 0F);
|
||||||
|
RightThing = new ModelRenderer(this, 0, 29);
|
||||||
|
RightThing.addBox(0F, 0F, 0F, 1, 12, 1);
|
||||||
|
RightThing.setRotationPoint(5.5F, 10F, -6F);
|
||||||
|
RightThing.setTextureSize(128, 64);
|
||||||
|
RightThing.mirror = true;
|
||||||
|
setRotation(RightThing, 0F, 0F, 0F);
|
||||||
|
BottomPlate = new ModelRenderer(this, 60, 7);
|
||||||
|
BottomPlate.addBox(0F, 0F, 0F, 12, 1, 4);
|
||||||
|
BottomPlate.setRotationPoint(-6F, 18F, -2F);
|
||||||
|
BottomPlate.setTextureSize(128, 64);
|
||||||
|
BottomPlate.mirror = true;
|
||||||
|
setRotation(BottomPlate, 0F, 0F, 0F);
|
||||||
|
TopPlate = new ModelRenderer(this, 60, 7);
|
||||||
|
TopPlate.addBox(0F, 0F, 0F, 12, 1, 4);
|
||||||
|
TopPlate.setRotationPoint(-6F, 13F, -2F);
|
||||||
|
TopPlate.setTextureSize(128, 64);
|
||||||
|
TopPlate.mirror = true;
|
||||||
|
setRotation(TopPlate, 0F, 0F, 0F);
|
||||||
|
LeftPlate = new ModelRenderer(this, 33, 5);
|
||||||
|
LeftPlate.addBox(0F, 0F, 0F, 12, 6, 1);
|
||||||
|
LeftPlate.setRotationPoint(-6F, 13F, 2F);
|
||||||
|
LeftPlate.setTextureSize(128, 64);
|
||||||
|
LeftPlate.mirror = true;
|
||||||
|
setRotation(LeftPlate, 0F, 0F, 0F);
|
||||||
|
RightPlate = new ModelRenderer(this, 33, 5);
|
||||||
|
RightPlate.addBox(0F, 0F, 0F, 12, 6, 1);
|
||||||
|
RightPlate.setRotationPoint(-6F, 13F, -3F);
|
||||||
|
RightPlate.setTextureSize(128, 64);
|
||||||
|
RightPlate.mirror = true;
|
||||||
|
setRotation(RightPlate, 0F, 0F, 0F);
|
||||||
|
BR1Block1 = new ModelRenderer(this, 33, 0);
|
||||||
|
BR1Block1.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
BR1Block1.setRotationPoint(4F, 17.5F, -3.5F);
|
||||||
|
BR1Block1.setTextureSize(128, 64);
|
||||||
|
BR1Block1.mirror = true;
|
||||||
|
setRotation(BR1Block1, 0F, 0.0174533F, 0F);
|
||||||
|
BL1Block1 = new ModelRenderer(this, 33, 0);
|
||||||
|
BL1Block1.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
BL1Block1.setRotationPoint(4F, 17.5F, 1.473333F);
|
||||||
|
BL1Block1.setTextureSize(128, 64);
|
||||||
|
BL1Block1.mirror = true;
|
||||||
|
setRotation(BL1Block1, 0F, 0F, 0F);
|
||||||
|
TL1Block1 = new ModelRenderer(this, 33, 0);
|
||||||
|
TL1Block1.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
TL1Block1.setRotationPoint(4F, 12.5F, 1.473333F);
|
||||||
|
TL1Block1.setTextureSize(128, 64);
|
||||||
|
TL1Block1.mirror = true;
|
||||||
|
setRotation(TL1Block1, 0F, 0F, 0F);
|
||||||
|
TR1Block1 = new ModelRenderer(this, 33, 0);
|
||||||
|
TR1Block1.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
TR1Block1.setRotationPoint(4F, 12.5F, -3.5F);
|
||||||
|
TR1Block1.setTextureSize(128, 64);
|
||||||
|
TR1Block1.mirror = true;
|
||||||
|
setRotation(TR1Block1, 0F, 0F, 0F);
|
||||||
|
BR1Block2 = new ModelRenderer(this, 33, 0);
|
||||||
|
BR1Block2.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
BR1Block2.setRotationPoint(-5F, 17.5F, -3.5F);
|
||||||
|
BR1Block2.setTextureSize(128, 64);
|
||||||
|
BR1Block2.mirror = true;
|
||||||
|
setRotation(BR1Block2, 0F, 0F, 0F);
|
||||||
|
BL1Block2 = new ModelRenderer(this, 33, 0);
|
||||||
|
BL1Block2.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
BL1Block2.setRotationPoint(-5F, 17.5F, 1.473333F);
|
||||||
|
BL1Block2.setTextureSize(128, 64);
|
||||||
|
BL1Block2.mirror = true;
|
||||||
|
setRotation(BL1Block2, 0F, 0F, 0F);
|
||||||
|
TL1Block2 = new ModelRenderer(this, 33, 0);
|
||||||
|
TL1Block2.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
TL1Block2.setRotationPoint(-5F, 12.5F, 1.473333F);
|
||||||
|
TL1Block2.setTextureSize(128, 64);
|
||||||
|
TL1Block2.mirror = true;
|
||||||
|
setRotation(TL1Block2, 0F, 0F, 0F);
|
||||||
|
TR1Block2 = new ModelRenderer(this, 33, 0);
|
||||||
|
TR1Block2.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||||
|
TR1Block2.setRotationPoint(-5F, 12.5F, -3.5F);
|
||||||
|
TR1Block2.setTextureSize(128, 64);
|
||||||
|
TR1Block2.mirror = true;
|
||||||
|
setRotation(TR1Block2, 0F, 0F, 0F);
|
||||||
|
PoleBR = new ModelRenderer(this, 40, 0);
|
||||||
|
PoleBR.addBox(0F, 0F, 0F, 8, 1, 1);
|
||||||
|
PoleBR.setRotationPoint(-4F, 18.2F, 2.2F);
|
||||||
|
PoleBR.setTextureSize(128, 64);
|
||||||
|
PoleBR.mirror = true;
|
||||||
|
setRotation(PoleBR, 0F, 0F, 0F);
|
||||||
|
PoleTL = new ModelRenderer(this, 40, 0);
|
||||||
|
PoleTL.addBox(0F, 0F, 0F, 8, 1, 1);
|
||||||
|
PoleTL.setRotationPoint(-4F, 12.8F, -3.2F);
|
||||||
|
PoleTL.setTextureSize(128, 64);
|
||||||
|
PoleTL.mirror = true;
|
||||||
|
setRotation(PoleTL, 0F, 0F, 0F);
|
||||||
|
PoleTR = new ModelRenderer(this, 40, 0);
|
||||||
|
PoleTR.addBox(0F, 0F, 0F, 8, 1, 1);
|
||||||
|
PoleTR.setRotationPoint(-4F, 12.8F, 2.2F);
|
||||||
|
PoleTR.setTextureSize(128, 64);
|
||||||
|
PoleTR.mirror = true;
|
||||||
|
setRotation(PoleTR, 0F, 0F, 0F);
|
||||||
|
PoleBL = new ModelRenderer(this, 40, 0);
|
||||||
|
PoleBL.addBox(0F, 0F, 0F, 8, 1, 1);
|
||||||
|
PoleBL.setRotationPoint(-4F, 18.2F, -3.2F);
|
||||||
|
PoleBL.setTextureSize(128, 64);
|
||||||
|
PoleBL.mirror = true;
|
||||||
|
setRotation(PoleBL, 0F, 0F, 0F);
|
||||||
|
InjectorTL = new ModelRenderer(this, 0, 46);
|
||||||
|
InjectorTL.addBox(0F, 0F, 0F, 4, 1, 1);
|
||||||
|
InjectorTL.setRotationPoint(-7F, 12F, -3F);
|
||||||
|
InjectorTL.setTextureSize(128, 64);
|
||||||
|
InjectorTL.mirror = true;
|
||||||
|
setRotation(InjectorTL, 0F, 0F, -0.7853982F);
|
||||||
|
InjectorBR = new ModelRenderer(this, 0, 46);
|
||||||
|
InjectorBR.addBox(0F, 0F, 0F, 4, 1, 1);
|
||||||
|
InjectorBR.setRotationPoint(-6.3F, 19.3F, 2F);
|
||||||
|
InjectorBR.setTextureSize(128, 64);
|
||||||
|
InjectorBR.mirror = true;
|
||||||
|
setRotation(InjectorBR, 0F, 0F, 0.7853982F);
|
||||||
|
InjectorTR = new ModelRenderer(this, 0, 46);
|
||||||
|
InjectorTR.addBox(0F, 0F, 0F, 4, 1, 1);
|
||||||
|
InjectorTR.setRotationPoint(-7F, 12F, 2F);
|
||||||
|
InjectorTR.setTextureSize(128, 64);
|
||||||
|
InjectorTR.mirror = true;
|
||||||
|
setRotation(InjectorTR, 0F, 0F, -0.7853982F);
|
||||||
|
InjectorBL = new ModelRenderer(this, 0, 46);
|
||||||
|
InjectorBL.addBox(0F, 0F, 0F, 4, 1, 1);
|
||||||
|
InjectorBL.setRotationPoint(-6.5F, 19F, -3F);
|
||||||
|
InjectorBL.setTextureSize(128, 64);
|
||||||
|
InjectorBL.mirror = true;
|
||||||
|
setRotation(InjectorBL, 0F, 0F, 0.7853982F);
|
||||||
|
Base = new ModelRenderer(this, 0, 0);
|
||||||
|
Base.addBox(0F, 0F, 0F, 2, 14, 14);
|
||||||
|
Base.setRotationPoint(6F, 9F, -7F);
|
||||||
|
Base.setTextureSize(128, 64);
|
||||||
|
Base.mirror = true;
|
||||||
|
setRotation(Base, 0F, 0F, 0F);
|
||||||
|
PipeBase = new ModelRenderer(this, 33, 13);
|
||||||
|
PipeBase.addBox(0F, 0F, 0F, 3, 8, 8);
|
||||||
|
PipeBase.setRotationPoint(-8F, 12F, -4F);
|
||||||
|
PipeBase.setTextureSize(128, 64);
|
||||||
|
PipeBase.mirror = true;
|
||||||
|
setRotation(PipeBase, 0F, 0F, 0F);
|
||||||
|
DecorPlate = new ModelRenderer(this, 5, 29);
|
||||||
|
DecorPlate.addBox(0F, 0F, 0F, 1, 8, 8);
|
||||||
|
DecorPlate.setRotationPoint(5F, 12F, -4F);
|
||||||
|
DecorPlate.setTextureSize(128, 64);
|
||||||
|
DecorPlate.mirror = true;
|
||||||
|
setRotation(DecorPlate, 0F, 0F, 0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void render(float size)
|
||||||
|
{
|
||||||
|
LeftThing.render(size);
|
||||||
|
RightThing.render(size);
|
||||||
|
BottomPlate.render(size);
|
||||||
|
TopPlate.render(size);
|
||||||
|
LeftPlate.render(size);
|
||||||
|
RightPlate.render(size);
|
||||||
|
BR1Block1.render(size);
|
||||||
|
BL1Block1.render(size);
|
||||||
|
TL1Block1.render(size);
|
||||||
|
TR1Block1.render(size);
|
||||||
|
BR1Block2.render(size);
|
||||||
|
BL1Block2.render(size);
|
||||||
|
TL1Block2.render(size);
|
||||||
|
TR1Block2.render(size);
|
||||||
|
PoleBR.render(size);
|
||||||
|
PoleTL.render(size);
|
||||||
|
PoleTR.render(size);
|
||||||
|
PoleBL.render(size);
|
||||||
|
InjectorTL.render(size);
|
||||||
|
InjectorBR.render(size);
|
||||||
|
InjectorTR.render(size);
|
||||||
|
InjectorBL.render(size);
|
||||||
|
Base.render(size);
|
||||||
|
PipeBase.render(size);
|
||||||
|
DecorPlate.render(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||||
|
{
|
||||||
|
model.rotateAngleX = x;
|
||||||
|
model.rotateAngleY = y;
|
||||||
|
model.rotateAngleZ = z;
|
||||||
|
}
|
||||||
|
}
|
|
@ -165,28 +165,6 @@ public class ModelMetallurgicInfuser extends ModelBase
|
||||||
TUBE.render(size);
|
TUBE.render(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
|
||||||
{
|
|
||||||
this.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
|
||||||
PANEL.render(f5);
|
|
||||||
MACHINE.render(f5);
|
|
||||||
CENTER_CIRCUIT.render(f5);
|
|
||||||
PIPE_1.render(f5);
|
|
||||||
PIPE_2.render(f5);
|
|
||||||
GUI_STAND.render(f5);
|
|
||||||
GUI_SCREEN.render(f5);
|
|
||||||
PIPE_2_TOP.render(f5);
|
|
||||||
PIPE_1_TOP.render(f5);
|
|
||||||
FRONT_PANEL.render(f5);
|
|
||||||
WIRE_1.render(f5);
|
|
||||||
WIRE_2.render(f5);
|
|
||||||
SIDE_WIRE_1.render(f5);
|
|
||||||
SIDE_WIRE_2.render(f5);
|
|
||||||
VERTICAL_WIRE.render(f5);
|
|
||||||
TUBE.render(f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
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.rotateAngleX = x;
|
||||||
|
|
|
@ -124,37 +124,6 @@ public class ModelRobit extends ModelBase
|
||||||
eyeLeft.mirror = true;
|
eyeLeft.mirror = true;
|
||||||
setRotation(eyeLeft, 0F, 0F, 0F);
|
setRotation(eyeLeft, 0F, 0F, 0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
|
||||||
{
|
|
||||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
|
||||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glRotatef(180, 0.0F, 1.0F, 0.0F);
|
|
||||||
|
|
||||||
Body.render(f5);
|
|
||||||
Bottom.render(f5);
|
|
||||||
RightTrack.render(f5);
|
|
||||||
LeftTrack.render(f5);
|
|
||||||
Neck.render(f5);
|
|
||||||
Head.render(f5);
|
|
||||||
Backpack.render(f5);
|
|
||||||
headback.render(f5);
|
|
||||||
rightarn.render(f5);
|
|
||||||
leftarm.render(f5);
|
|
||||||
righthand.render(f5);
|
|
||||||
lefthand.render(f5);
|
|
||||||
|
|
||||||
MekanismRenderer.glowOn();
|
|
||||||
backLight.render(f5);
|
|
||||||
eyeRight.render(f5);
|
|
||||||
eyeLeft.render(f5);
|
|
||||||
MekanismRenderer.glowOff();
|
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void render(float size)
|
public void render(float size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -125,18 +125,6 @@ public class ModelTransmitter extends ModelBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
|
||||||
{
|
|
||||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
|
||||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
|
||||||
|
|
||||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
|
||||||
{
|
|
||||||
renderSide(orientation, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void renderSide(ForgeDirection orientation, boolean on)
|
public void renderSide(ForgeDirection orientation, boolean on)
|
||||||
{
|
{
|
||||||
if(on)
|
if(on)
|
||||||
|
|
|
@ -3,6 +3,7 @@ package mekanism.client.render.block;
|
||||||
import mekanism.client.ClientProxy;
|
import mekanism.client.ClientProxy;
|
||||||
import mekanism.client.model.ModelChargepad;
|
import mekanism.client.model.ModelChargepad;
|
||||||
import mekanism.client.model.ModelElectricPump;
|
import mekanism.client.model.ModelElectricPump;
|
||||||
|
import mekanism.client.model.ModelLogisticalSorter;
|
||||||
import mekanism.client.model.ModelMetallurgicInfuser;
|
import mekanism.client.model.ModelMetallurgicInfuser;
|
||||||
import mekanism.client.render.MekanismRenderer;
|
import mekanism.client.render.MekanismRenderer;
|
||||||
import mekanism.common.Mekanism;
|
import mekanism.common.Mekanism;
|
||||||
|
@ -26,6 +27,7 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
public ModelElectricPump electricPump = new ModelElectricPump();
|
public ModelElectricPump electricPump = new ModelElectricPump();
|
||||||
public ModelMetallurgicInfuser metallurgicInfuser = new ModelMetallurgicInfuser();
|
public ModelMetallurgicInfuser metallurgicInfuser = new ModelMetallurgicInfuser();
|
||||||
public ModelChargepad chargepad = new ModelChargepad();
|
public ModelChargepad chargepad = new ModelChargepad();
|
||||||
|
public ModelLogisticalSorter logisticalSorter = new ModelLogisticalSorter();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||||
|
@ -63,6 +65,14 @@ public class MachineRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Chargepad.png"));
|
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "Chargepad.png"));
|
||||||
chargepad.render(0.0625F);
|
chargepad.render(0.0625F);
|
||||||
}
|
}
|
||||||
|
else if(metadata == MachineType.LOGISTICAL_SORTER.meta)
|
||||||
|
{
|
||||||
|
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||||
|
GL11.glRotatef(270F, 0.0F, -1.0F, 0.0F);
|
||||||
|
GL11.glTranslatef(0.0F, -0.85F, -0.15F);
|
||||||
|
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LogisticalSorter.png"));
|
||||||
|
logisticalSorter.render(0.0625F);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
MekanismRenderer.renderItem(renderer, metadata, block);
|
MekanismRenderer.renderItem(renderer, metadata, block);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
package mekanism.client.render.tileentity;
|
||||||
|
|
||||||
|
import mekanism.client.model.ModelLogisticalSorter;
|
||||||
|
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||||
|
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 RenderLogisticalSorter extends TileEntitySpecialRenderer
|
||||||
|
{
|
||||||
|
private ModelLogisticalSorter model = new ModelLogisticalSorter();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTick)
|
||||||
|
{
|
||||||
|
renderAModelAt((TileEntityLogisticalSorter)tileEntity, x, y, z, 1F);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void renderAModelAt(TileEntityLogisticalSorter 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, "LogisticalSorter.png"));
|
||||||
|
|
||||||
|
switch(tileEntity.facing)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
GL11.glRotatef(90F, 0.0F, 0.0F, -1.0F);
|
||||||
|
GL11.glTranslatef(1.0F, 1.0F, 0.0F);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||||
|
GL11.glTranslatef(-1.0F, 1.0F, 0.0F);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: GL11.glRotatef(90, 0.0F, 1.0F, 0.0F); break;
|
||||||
|
case 3: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
|
||||||
|
case 4: GL11.glRotatef(180, 0.0F, 1.0F, 0.0F); break;
|
||||||
|
case 5: GL11.glRotatef(0, 0.0F, 1.0F, 0.0F); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
|
||||||
|
model.render(0.0625F);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
|
@ -35,6 +35,7 @@ import mekanism.common.tileentity.TileEntityEnergyCube;
|
||||||
import mekanism.common.tileentity.TileEntityEnrichmentChamber;
|
import mekanism.common.tileentity.TileEntityEnrichmentChamber;
|
||||||
import mekanism.common.tileentity.TileEntityFactory;
|
import mekanism.common.tileentity.TileEntityFactory;
|
||||||
import mekanism.common.tileentity.TileEntityGasTank;
|
import mekanism.common.tileentity.TileEntityGasTank;
|
||||||
|
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||||
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||||
import mekanism.common.tileentity.TileEntityMechanicalPipe;
|
import mekanism.common.tileentity.TileEntityMechanicalPipe;
|
||||||
import mekanism.common.tileentity.TileEntityMetallurgicInfuser;
|
import mekanism.common.tileentity.TileEntityMetallurgicInfuser;
|
||||||
|
@ -83,6 +84,7 @@ public class CommonProxy
|
||||||
GameRegistry.registerTileEntity(TileEntityDynamicValve.class, "DynamicValve");
|
GameRegistry.registerTileEntity(TileEntityDynamicValve.class, "DynamicValve");
|
||||||
GameRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad");
|
GameRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad");
|
||||||
GameRegistry.registerTileEntity(TileEntityLogisticalTransporter.class, "LogisticalTransporter");
|
GameRegistry.registerTileEntity(TileEntityLogisticalTransporter.class, "LogisticalTransporter");
|
||||||
|
GameRegistry.registerTileEntity(TileEntityLogisticalSorter.class, "LogisticalSorter");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1009,7 +1009,6 @@ public class Mekanism
|
||||||
GameRegistry.registerTileEntity(TileEntityBoundingBlock.class, "BoundingBlock");
|
GameRegistry.registerTileEntity(TileEntityBoundingBlock.class, "BoundingBlock");
|
||||||
GameRegistry.registerTileEntity(TileEntityGasTank.class, "GasTank");
|
GameRegistry.registerTileEntity(TileEntityGasTank.class, "GasTank");
|
||||||
GameRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter");
|
GameRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter");
|
||||||
GameRegistry.registerTileEntity(TileEntityLogisticalSorter.class, "LogisticalSorter");
|
|
||||||
|
|
||||||
//Load tile entities that have special renderers.
|
//Load tile entities that have special renderers.
|
||||||
proxy.registerSpecialTileEntities();
|
proxy.registerSpecialTileEntities();
|
||||||
|
|
|
@ -141,12 +141,6 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
||||||
icons[10][1] = register.registerIcon("mekanism:EnergizedSmelterFrontOn");
|
icons[10][1] = register.registerIcon("mekanism:EnergizedSmelterFrontOn");
|
||||||
icons[10][2] = register.registerIcon("mekanism:SteelCasing");
|
icons[10][2] = register.registerIcon("mekanism:SteelCasing");
|
||||||
icons[11][0] = register.registerIcon("mekanism:Teleporter");
|
icons[11][0] = register.registerIcon("mekanism:Teleporter");
|
||||||
icons[15][0] = register.registerIcon("mekanism:LogisticalSorterSideOn");
|
|
||||||
icons[15][1] = register.registerIcon("mekanism:LogisticalSorterSideOff");
|
|
||||||
icons[15][2] = register.registerIcon("mekanism:LogisticalSorterFrontOn");
|
|
||||||
icons[15][3] = register.registerIcon("mekanism:LogisticalSorterFrontOff");
|
|
||||||
icons[15][4] = register.registerIcon("mekanism:LogisticalSorterBackOn");
|
|
||||||
icons[15][5] = register.registerIcon("mekanism:LogisticalSorterBackOff");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -169,12 +163,15 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(side)
|
if(change != 0 && change != 1)
|
||||||
{
|
{
|
||||||
case 0: change = 2; break;
|
switch(side)
|
||||||
case 1: change = 5; break;
|
{
|
||||||
case 2: change = 3; break;
|
case 0: change = 2; break;
|
||||||
case 3: change = 4; break;
|
case 1: change = 5; break;
|
||||||
|
case 2: change = 3; break;
|
||||||
|
case 3: change = 4; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tileEntity.setFacing((short)change);
|
tileEntity.setFacing((short)change);
|
||||||
|
@ -365,20 +362,6 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
||||||
{
|
{
|
||||||
return icons[11][0];
|
return icons[11][0];
|
||||||
}
|
}
|
||||||
else if(meta == 15)
|
|
||||||
{
|
|
||||||
if(side == 1)
|
|
||||||
{
|
|
||||||
return icons[15][3];
|
|
||||||
}
|
|
||||||
else if(side == 0)
|
|
||||||
{
|
|
||||||
return icons[15][5];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return icons[15][1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -516,20 +499,6 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
||||||
{
|
{
|
||||||
return icons[11][0];
|
return icons[11][0];
|
||||||
}
|
}
|
||||||
else if(metadata == 15)
|
|
||||||
{
|
|
||||||
if(side == tileEntity.facing)
|
|
||||||
{
|
|
||||||
return MekanismUtils.isActive(world, x, y, z) ? icons[15][2] : icons[15][3];
|
|
||||||
}
|
|
||||||
else if(side == ForgeDirection.getOrientation(tileEntity.facing).getOpposite().ordinal())
|
|
||||||
{
|
|
||||||
return MekanismUtils.isActive(world, x, y, z) ? icons[15][4] : icons[15][5];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return MekanismUtils.isActive(world, x, y, z) ? icons[15][0] : icons[15][1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -894,7 +863,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
||||||
ELECTRIC_PUMP(12, "ElectricPump", 17, 10000, TileEntityElectricPump.class, true),
|
ELECTRIC_PUMP(12, "ElectricPump", 17, 10000, TileEntityElectricPump.class, true),
|
||||||
ELECTRIC_CHEST(13, "ElectricChest", -1, 12000, TileEntityElectricChest.class, true),
|
ELECTRIC_CHEST(13, "ElectricChest", -1, 12000, TileEntityElectricChest.class, true),
|
||||||
CHARGEPAD(14, "Chargepad", -1, 9000, TileEntityChargepad.class, true),
|
CHARGEPAD(14, "Chargepad", -1, 9000, TileEntityChargepad.class, true),
|
||||||
LOGISTICAL_SORTER(15, "LogisticalSorter", -1, 12000, TileEntityLogisticalSorter.class, false);
|
LOGISTICAL_SORTER(15, "LogisticalSorter", -1, 0, TileEntityLogisticalSorter.class, true);
|
||||||
|
|
||||||
public int meta;
|
public int meta;
|
||||||
public String name;
|
public String name;
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
package mekanism.common.tileentity;
|
package mekanism.common.tileentity;
|
||||||
|
|
||||||
import ic2.api.energy.tile.IEnergySink;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import mekanism.api.EnumColor;
|
import mekanism.api.EnumColor;
|
||||||
import mekanism.api.Object3D;
|
import mekanism.api.Object3D;
|
||||||
import mekanism.api.energy.IStrictEnergyAcceptor;
|
|
||||||
import mekanism.common.HashList;
|
import mekanism.common.HashList;
|
||||||
import mekanism.common.IActiveState;
|
import mekanism.common.IActiveState;
|
||||||
import mekanism.common.IRedstoneControl;
|
import mekanism.common.IRedstoneControl;
|
||||||
|
@ -29,7 +27,7 @@ import net.minecraftforge.common.ForgeDirection;
|
||||||
|
|
||||||
import com.google.common.io.ByteArrayDataInput;
|
import com.google.common.io.ByteArrayDataInput;
|
||||||
|
|
||||||
public class TileEntityLogisticalSorter extends TileEntityElectricBlock implements IRedstoneControl, IActiveState, IEnergySink, IStrictEnergyAcceptor
|
public class TileEntityLogisticalSorter extends TileEntityElectricBlock implements IRedstoneControl, IActiveState
|
||||||
{
|
{
|
||||||
public HashList<TransporterFilter> filters = new HashList<TransporterFilter>();
|
public HashList<TransporterFilter> filters = new HashList<TransporterFilter>();
|
||||||
|
|
||||||
|
@ -93,13 +91,9 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double needed = getEnergyNeeded(inInventory.itemStack);
|
if(TransporterUtils.insert(this, transporter, inInventory.itemStack, filterColor))
|
||||||
|
|
||||||
if(getEnergy() >= needed && TransporterUtils.insert(this, transporter, inInventory.itemStack, filterColor))
|
|
||||||
{
|
{
|
||||||
setEnergy(getEnergy()-getEnergyNeeded(inInventory.itemStack));
|
|
||||||
inventory.setInventorySlotContents(inInventory.slotID, null);
|
inventory.setInventorySlotContents(inInventory.slotID, null);
|
||||||
setActive(true);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
inventory.setInventorySlotContents(inInventory.slotID, inInventory.itemStack);
|
inventory.setInventorySlotContents(inInventory.slotID, inInventory.itemStack);
|
||||||
|
@ -243,16 +237,6 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private double getEnergyNeeded(ItemStack itemStack)
|
|
||||||
{
|
|
||||||
if(itemStack == null)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return itemStack.stackSize*ENERGY_PER_ITEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList getNetworkedData(ArrayList data)
|
public ArrayList getNetworkedData(ArrayList data)
|
||||||
{
|
{
|
||||||
|
@ -392,66 +376,16 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction)
|
protected EnumSet<ForgeDirection> getConsumingSides()
|
||||||
{
|
{
|
||||||
return true;
|
return EnumSet.noneOf(ForgeDirection.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public double transferEnergyToAcceptor(double amount)
|
public float getRequest(ForgeDirection direction)
|
||||||
{
|
{
|
||||||
double rejects = 0;
|
return 0;
|
||||||
double neededElectricity = getMaxEnergy()-getEnergy();
|
|
||||||
|
|
||||||
if(amount <= neededElectricity)
|
|
||||||
{
|
|
||||||
electricityStored += amount;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
electricityStored += neededElectricity;
|
|
||||||
rejects = amount-neededElectricity;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rejects;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canReceiveEnergy(ForgeDirection side)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public double demandedEnergyUnits()
|
|
||||||
{
|
|
||||||
return (getMaxEnergy() - getEnergy())*Mekanism.TO_IC2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public double injectEnergyUnits(ForgeDirection direction, double i)
|
|
||||||
{
|
|
||||||
double givenEnergy = i*Mekanism.FROM_IC2;
|
|
||||||
double rejects = 0;
|
|
||||||
double neededEnergy = getMaxEnergy()-getEnergy();
|
|
||||||
|
|
||||||
if(givenEnergy < neededEnergy)
|
|
||||||
{
|
|
||||||
electricityStored += givenEnergy;
|
|
||||||
}
|
|
||||||
else if(givenEnergy > neededEnergy)
|
|
||||||
{
|
|
||||||
electricityStored += neededEnergy;
|
|
||||||
rejects = givenEnergy-neededEnergy;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rejects*Mekanism.TO_IC2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getMaxSafeInput()
|
|
||||||
{
|
|
||||||
return 2048;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
{
|
{
|
||||||
if(!stack.initiatedPath)
|
if(!stack.initiatedPath)
|
||||||
{
|
{
|
||||||
if(!recalculate(stack))
|
if(!recalculate(stack, null))
|
||||||
{
|
{
|
||||||
remove.add(stack);
|
remove.add(stack);
|
||||||
continue;
|
continue;
|
||||||
|
@ -64,6 +64,8 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
|
|
||||||
if(stack.progress > 100)
|
if(stack.progress > 100)
|
||||||
{
|
{
|
||||||
|
Object3D prevSet = null;
|
||||||
|
|
||||||
if(stack.hasPath())
|
if(stack.hasPath())
|
||||||
{
|
{
|
||||||
int currentIndex = stack.pathToTarget.indexOf(Object3D.get(this));
|
int currentIndex = stack.pathToTarget.indexOf(Object3D.get(this));
|
||||||
|
@ -79,6 +81,10 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if(next != null)
|
||||||
|
{
|
||||||
|
prevSet = next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!stack.noTarget)
|
if(!stack.noTarget)
|
||||||
|
@ -100,6 +106,8 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
else {
|
else {
|
||||||
needsSync.add(stack);
|
needsSync.add(stack);
|
||||||
stack.itemStack = rejected;
|
stack.itemStack = rejected;
|
||||||
|
|
||||||
|
prevSet = next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,13 +115,19 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!recalculate(stack))
|
if(!recalculate(stack, prevSet))
|
||||||
{
|
{
|
||||||
remove.add(stack);
|
remove.add(stack);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
stack.progress = 50;
|
if(prevSet != null)
|
||||||
|
{
|
||||||
|
stack.progress = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
stack.progress = 50;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(stack.progress == 50)
|
else if(stack.progress == 50)
|
||||||
|
@ -122,7 +136,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
{
|
{
|
||||||
if(!TransporterUtils.canInsert(stack.getDest().getTileEntity(worldObj), stack.itemStack, stack.getSide(this)) && !stack.noTarget)
|
if(!TransporterUtils.canInsert(stack.getDest().getTileEntity(worldObj), stack.itemStack, stack.getSide(this)) && !stack.noTarget)
|
||||||
{
|
{
|
||||||
if(!recalculate(stack))
|
if(!recalculate(stack, null))
|
||||||
{
|
{
|
||||||
remove.add(stack);
|
remove.add(stack);
|
||||||
continue;
|
continue;
|
||||||
|
@ -130,7 +144,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
}
|
}
|
||||||
else if(stack.noTarget)
|
else if(stack.noTarget)
|
||||||
{
|
{
|
||||||
if(!recalculate(stack))
|
if(!recalculate(stack, null))
|
||||||
{
|
{
|
||||||
remove.add(stack);
|
remove.add(stack);
|
||||||
continue;
|
continue;
|
||||||
|
@ -140,7 +154,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
else {
|
else {
|
||||||
if(!stack.canInsertToTransporter(stack.getNext(this).getTileEntity(worldObj)))
|
if(!stack.canInsertToTransporter(stack.getNext(this).getTileEntity(worldObj)))
|
||||||
{
|
{
|
||||||
if(!recalculate(stack))
|
if(!recalculate(stack, null))
|
||||||
{
|
{
|
||||||
remove.add(stack);
|
remove.add(stack);
|
||||||
continue;
|
continue;
|
||||||
|
@ -168,7 +182,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean recalculate(TransporterStack stack)
|
private boolean recalculate(TransporterStack stack, Object3D from)
|
||||||
{
|
{
|
||||||
needsSync.add(stack);
|
needsSync.add(stack);
|
||||||
|
|
||||||
|
@ -181,6 +195,11 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(from != null)
|
||||||
|
{
|
||||||
|
stack.originalLocation = from;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -197,35 +197,6 @@ public class ModelElectrolyticSeparator extends ModelBase
|
||||||
V.render(size);
|
V.render(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
|
||||||
{
|
|
||||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
|
||||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
|
||||||
A.renderWithRotation(f5);
|
|
||||||
B.renderWithRotation(f5);
|
|
||||||
C.renderWithRotation(f5);
|
|
||||||
D.renderWithRotation(f5);
|
|
||||||
E.renderWithRotation(f5);
|
|
||||||
F.renderWithRotation(f5);
|
|
||||||
G.renderWithRotation(f5);
|
|
||||||
H.renderWithRotation(f5);
|
|
||||||
I.renderWithRotation(f5);
|
|
||||||
J.renderWithRotation(f5);
|
|
||||||
K.renderWithRotation(f5);
|
|
||||||
L.renderWithRotation(f5);
|
|
||||||
M.renderWithRotation(f5);
|
|
||||||
N.renderWithRotation(f5);
|
|
||||||
OUTPUT.renderWithRotation(f5);
|
|
||||||
P.renderWithRotation(f5);
|
|
||||||
Q.renderWithRotation(f5);
|
|
||||||
R.renderWithRotation(f5);
|
|
||||||
S.renderWithRotation(f5);
|
|
||||||
T.renderWithRotation(f5);
|
|
||||||
U.renderWithRotation(f5);
|
|
||||||
V.renderWithRotation(f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
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.rotateAngleX = x;
|
||||||
|
|
|
@ -141,28 +141,6 @@ public class ModelHeatGenerator extends ModelBase
|
||||||
O.render(size);
|
O.render(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
|
||||||
{
|
|
||||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
|
||||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
|
||||||
A.renderWithRotation(f5);
|
|
||||||
B.renderWithRotation(f5);
|
|
||||||
C.renderWithRotation(f5);
|
|
||||||
D.renderWithRotation(f5);
|
|
||||||
E.renderWithRotation(f5);
|
|
||||||
F.renderWithRotation(f5);
|
|
||||||
G.renderWithRotation(f5);
|
|
||||||
H.renderWithRotation(f5);
|
|
||||||
I.renderWithRotation(f5);
|
|
||||||
J.renderWithRotation(f5);
|
|
||||||
K.renderWithRotation(f5);
|
|
||||||
L.renderWithRotation(f5);
|
|
||||||
M.renderWithRotation(f5);
|
|
||||||
N.renderWithRotation(f5);
|
|
||||||
O.renderWithRotation(f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
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.rotateAngleX = x;
|
||||||
|
|
|
@ -173,32 +173,6 @@ public class ModelHydrogenGenerator extends ModelBase
|
||||||
S.render(size);
|
S.render(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
|
||||||
{
|
|
||||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
|
||||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
|
||||||
A.renderWithRotation(f5);
|
|
||||||
B.renderWithRotation(f5);
|
|
||||||
C.renderWithRotation(f5);
|
|
||||||
D.renderWithRotation(f5);
|
|
||||||
E.renderWithRotation(f5);
|
|
||||||
F.renderWithRotation(f5);
|
|
||||||
G.renderWithRotation(f5);
|
|
||||||
H.renderWithRotation(f5);
|
|
||||||
I.renderWithRotation(f5);
|
|
||||||
J.renderWithRotation(f5);
|
|
||||||
K.renderWithRotation(f5);
|
|
||||||
L.renderWithRotation(f5);
|
|
||||||
M.renderWithRotation(f5);
|
|
||||||
N.renderWithRotation(f5);
|
|
||||||
O.renderWithRotation(f5);
|
|
||||||
P.renderWithRotation(f5);
|
|
||||||
Q.renderWithRotation(f5);
|
|
||||||
R.renderWithRotation(f5);
|
|
||||||
S.renderWithRotation(f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
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.rotateAngleX = x;
|
||||||
|
|
|
@ -143,27 +143,6 @@ public class ModelWindTurbine extends ModelBase
|
||||||
return angle % 360;
|
return angle % 360;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
|
||||||
{
|
|
||||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
|
||||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
|
||||||
Base.render(f5);
|
|
||||||
TowerFront.render(f5);
|
|
||||||
TowerLeft.render(f5);
|
|
||||||
TowerBack.render(f5);
|
|
||||||
TowerRight.render(f5);
|
|
||||||
TowerMoterFront.render(f5);
|
|
||||||
TowerBaseMotor.render(f5);
|
|
||||||
TowerBaseMotorBack.render(f5);
|
|
||||||
TowerMotor.render(f5);
|
|
||||||
Rotor.render(f5);
|
|
||||||
RotorCover.render(f5);
|
|
||||||
BladeBaseC.render(f5);
|
|
||||||
BladeBaseB.render(f5);
|
|
||||||
BladeBaseA.render(f5);
|
|
||||||
}
|
|
||||||
|
|
||||||
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.rotateAngleX = x;
|
||||||
|
|
BIN
resources/assets/mekanism/render/LogisticalSorter.png
Normal file
BIN
resources/assets/mekanism/render/LogisticalSorter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4 KiB |
Loading…
Add table
Reference in a new issue