Divertion transporter fixes, including name change
This commit is contained in:
parent
51225ba715
commit
dc1743d517
10 changed files with 67 additions and 37 deletions
|
@ -82,7 +82,7 @@ import mekanism.common.tileentity.TileEntityEnergyCube;
|
|||
import mekanism.common.tileentity.TileEntityEnrichmentChamber;
|
||||
import mekanism.common.tileentity.TileEntityFactory;
|
||||
import mekanism.common.tileentity.TileEntityGasTank;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalDiverter;
|
||||
import mekanism.common.tileentity.TileEntityDivertionTransporter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||
import mekanism.common.tileentity.TileEntityMechanicalPipe;
|
||||
|
@ -251,7 +251,7 @@ public class ClientProxy extends CommonProxy
|
|||
ClientRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad", new RenderChargepad());
|
||||
ClientRegistry.registerTileEntity(TileEntityLogisticalTransporter.class, "LogisticalTransporter", new RenderLogisticalTransporter());
|
||||
|
||||
ClientRegistry.registerTileEntity(TileEntityLogisticalDiverter.class, "LogisticalDiverter", new RenderLogisticalTransporter());
|
||||
ClientRegistry.registerTileEntity(TileEntityDivertionTransporter.class, "LogisticalDiverter", new RenderLogisticalTransporter());
|
||||
ClientRegistry.registerTileEntity(TileEntityLogisticalSorter.class, "LogisticalSorter", new RenderLogisticalSorter());
|
||||
ClientRegistry.registerTileEntity(TileEntityBin.class, "Bin", new RenderBin());
|
||||
ClientRegistry.registerTileEntity(TileEntityDigitalMiner.class, "DigitalMiner", new RenderDigitalMiner());
|
||||
|
|
|
@ -48,9 +48,12 @@ public class TransmitterRenderingHandler implements ISimpleBlockRenderingHandler
|
|||
case 4:
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "RestrictiveTransporter.png"));
|
||||
break;
|
||||
case 5:
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "LogisticalDiverter.png"));
|
||||
break;
|
||||
}
|
||||
|
||||
if(metadata != 3 && metadata != 4)
|
||||
if(metadata != 3 && metadata != 4 && metadata != 5)
|
||||
{
|
||||
smallTransmitter.renderSide(ForgeDirection.UP, true);
|
||||
smallTransmitter.renderSide(ForgeDirection.DOWN, true);
|
||||
|
|
|
@ -38,7 +38,7 @@ import mekanism.common.tileentity.TileEntityEnergyCube;
|
|||
import mekanism.common.tileentity.TileEntityEnrichmentChamber;
|
||||
import mekanism.common.tileentity.TileEntityFactory;
|
||||
import mekanism.common.tileentity.TileEntityGasTank;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalDiverter;
|
||||
import mekanism.common.tileentity.TileEntityDivertionTransporter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||
import mekanism.common.tileentity.TileEntityMechanicalPipe;
|
||||
|
@ -92,7 +92,7 @@ public class CommonProxy
|
|||
GameRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad");
|
||||
GameRegistry.registerTileEntity(TileEntityLogisticalTransporter.class, "LogisticalTransporter");
|
||||
|
||||
GameRegistry.registerTileEntity(TileEntityLogisticalDiverter.class, "LogisticalDiverter");
|
||||
GameRegistry.registerTileEntity(TileEntityDivertionTransporter.class, "LogisticalDiverter");
|
||||
GameRegistry.registerTileEntity(TileEntityLogisticalSorter.class, "LogisticalSorter");
|
||||
GameRegistry.registerTileEntity(TileEntityBin.class, "Bin");
|
||||
GameRegistry.registerTileEntity(TileEntityDigitalMiner.class, "DigitalMiner");
|
||||
|
|
|
@ -9,7 +9,7 @@ import mekanism.api.transmitters.ITransmitter;
|
|||
import mekanism.client.ClientProxy;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PipeUtils;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalDiverter;
|
||||
import mekanism.common.tileentity.TileEntityDivertionTransporter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||
import mekanism.common.tileentity.TileEntityMechanicalPipe;
|
||||
import mekanism.common.tileentity.TileEntityPressurizedTube;
|
||||
|
@ -42,7 +42,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
* 2: Mechanical Pipe
|
||||
* 3: Logistical Transporter
|
||||
* 4: Restrictive Transporter
|
||||
* 5: Logistical Diverter
|
||||
* 5: Diversion Transporter
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
|
@ -376,7 +376,7 @@ public class BlockTransmitter extends Block
|
|||
return new TileEntityLogisticalTransporter();
|
||||
|
||||
case 5:
|
||||
return new TileEntityLogisticalDiverter();
|
||||
return new TileEntityDivertionTransporter();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ import net.minecraft.util.Icon;
|
|||
* 1: Universal Cable
|
||||
* 2: Mechanical Pipe
|
||||
* 3: Logistical Transporter
|
||||
* 4: Restrictive Transporter
|
||||
* 5: Diversion Transporter
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
|
@ -75,6 +77,13 @@ public class ItemBlockTransmitter extends ItemBlock
|
|||
list.add("- " + EnumColor.PURPLE + "Blocks (universal)");
|
||||
list.add("- " + EnumColor.DARK_RED + "Only used if no other paths available");
|
||||
}
|
||||
else if(itemstack.getItemDamage() == 5)
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "Items (universal)");
|
||||
list.add("- " + EnumColor.PURPLE + "Blocks (universal)");
|
||||
list.add("- " + EnumColor.DARK_RED + "Controlable by redstone");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,6 +121,9 @@ public class ItemBlockTransmitter extends ItemBlock
|
|||
case 4:
|
||||
name = "RestrictiveTransporter";
|
||||
break;
|
||||
case 5:
|
||||
name = "DiversionTransporter";
|
||||
break;
|
||||
default:
|
||||
name = "Unknown";
|
||||
break;
|
||||
|
|
|
@ -16,7 +16,7 @@ import mekanism.common.tileentity.TileEntityBin;
|
|||
import mekanism.common.tileentity.TileEntityContainerBlock;
|
||||
import mekanism.common.tileentity.TileEntityElectricChest;
|
||||
import mekanism.common.tileentity.TileEntityElectricPump;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalDiverter;
|
||||
import mekanism.common.tileentity.TileEntityDivertionTransporter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||
import mekanism.common.tileentity.TileEntityMechanicalPipe;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
@ -73,8 +73,8 @@ public class ItemConfigurator extends ItemEnergized
|
|||
else if(world.getBlockTileEntity(x, y, z) instanceof TileEntityLogisticalTransporter)
|
||||
{
|
||||
//Player can access color by sneaking
|
||||
if(world.getBlockTileEntity(x, y, z) instanceof TileEntityLogisticalDiverter){
|
||||
TileEntityLogisticalDiverter transporter = (TileEntityLogisticalDiverter)world.getBlockTileEntity(x, y, z);
|
||||
if(world.getBlockTileEntity(x, y, z) instanceof TileEntityDivertionTransporter){
|
||||
TileEntityDivertionTransporter transporter = (TileEntityDivertionTransporter)world.getBlockTileEntity(x, y, z);
|
||||
int newMode=(transporter.modes[side]+1)%3;
|
||||
transporter.modes[side]=newMode;
|
||||
String description="ERROR";
|
||||
|
|
|
@ -9,7 +9,7 @@ import mekanism.common.util.TransporterUtils;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
||||
public class TileEntityLogisticalDiverter extends TileEntityLogisticalTransporter {
|
||||
public class TileEntityDivertionTransporter extends TileEntityLogisticalTransporter {
|
||||
|
||||
public int[] modes={0,0,0,0,0,0};
|
||||
@Override
|
||||
|
@ -25,19 +25,8 @@ public class TileEntityLogisticalDiverter extends TileEntityLogisticalTransporte
|
|||
super.writeToNBT(nbtTags);
|
||||
nbtTags.setIntArray("modes", modes);
|
||||
}
|
||||
@Override
|
||||
public ArrayList getNetworkedData(ArrayList data)
|
||||
{
|
||||
data=super.getNetworkedData(data);
|
||||
data.add(modes[0]);
|
||||
data.add(modes[1]);
|
||||
data.add(modes[2]);
|
||||
data.add(modes[3]);
|
||||
data.add(modes[4]);
|
||||
data.add(modes[5]);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void handlePacketData(ByteArrayDataInput dataStream)
|
||||
{
|
||||
|
@ -49,5 +38,30 @@ public class TileEntityLogisticalDiverter extends TileEntityLogisticalTransporte
|
|||
modes[4]=dataStream.readInt();
|
||||
modes[5]=dataStream.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList getNetworkedData(ArrayList data)
|
||||
{
|
||||
data=super.getNetworkedData(data);
|
||||
data.add(modes[0]);
|
||||
data.add(modes[1]);
|
||||
data.add(modes[2]);
|
||||
data.add(modes[3]);
|
||||
data.add(modes[4]);
|
||||
data.add(modes[5]);
|
||||
return data;
|
||||
}
|
||||
|
||||
public ArrayList getSyncPacket(TransporterStack stack, boolean kill)
|
||||
{
|
||||
ArrayList data=super.getSyncPacket(stack, kill);
|
||||
data.add(modes[0]);
|
||||
data.add(modes[1]);
|
||||
data.add(modes[2]);
|
||||
data.add(modes[3]);
|
||||
data.add(modes[4]);
|
||||
data.add(modes[5]);
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
|
@ -9,7 +9,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalDiverter;
|
||||
import mekanism.common.tileentity.TileEntityDivertionTransporter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||
import mekanism.common.transporter.TransporterPathfinder.Pathfinder.DestChecker;
|
||||
|
@ -186,15 +186,15 @@ public final class TransporterPathfinder
|
|||
{
|
||||
//Check for logistical Diverter
|
||||
TileEntity currTile = pointer.getTileEntity(worldObj);
|
||||
if(currTile instanceof TileEntityLogisticalDiverter){
|
||||
int mode=((TileEntityLogisticalDiverter) currTile).modes[side.ordinal()];
|
||||
if(currTile instanceof TileEntityDivertionTransporter){
|
||||
int mode=((TileEntityDivertionTransporter) currTile).modes[side.ordinal()];
|
||||
boolean redstone=currTile.worldObj.isBlockIndirectlyGettingPowered(currTile.xCoord, currTile.yCoord,currTile.zCoord);
|
||||
if((mode==2&&redstone==true)||(mode==1&&redstone==false)){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(tile instanceof TileEntityLogisticalDiverter){
|
||||
int mode=((TileEntityLogisticalDiverter) tile).modes[side.ordinal()];
|
||||
if(tile instanceof TileEntityDivertionTransporter){
|
||||
int mode=((TileEntityDivertionTransporter) tile).modes[side.ordinal()];
|
||||
boolean redstone=tile.worldObj.isBlockIndirectlyGettingPowered(tile.xCoord, tile.yCoord,tile.zCoord);
|
||||
if((mode==2&&redstone==true)||(mode==1&&redstone==false)){
|
||||
continue;
|
||||
|
|
|
@ -8,7 +8,7 @@ import mekanism.api.IConfigurable;
|
|||
import mekanism.api.Object3D;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
import mekanism.common.tileentity.TileEntityBin;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalDiverter;
|
||||
import mekanism.common.tileentity.TileEntityDivertionTransporter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalTransporter;
|
||||
import mekanism.common.transporter.TransporterStack;
|
||||
|
@ -90,8 +90,8 @@ public final class TransporterUtils
|
|||
{
|
||||
|
||||
int side = Arrays.asList(connectedInventories).indexOf(inventory);
|
||||
if(tileEntity instanceof TileEntityLogisticalDiverter){
|
||||
int mode=((TileEntityLogisticalDiverter) tileEntity).modes[side];
|
||||
if(tileEntity instanceof TileEntityDivertionTransporter){
|
||||
int mode=((TileEntityDivertionTransporter) tileEntity).modes[side];
|
||||
boolean redstone=tileEntity.worldObj.isBlockIndirectlyGettingPowered(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
if((mode==2&&redstone==true)||(mode==1&&redstone==false)){
|
||||
continue;
|
||||
|
@ -138,8 +138,8 @@ public final class TransporterUtils
|
|||
|
||||
int side = Arrays.asList(connectedTransporters).indexOf(tile);
|
||||
//Check for logistical Diverter
|
||||
if(tileEntity instanceof TileEntityLogisticalDiverter){
|
||||
int mode=((TileEntityLogisticalDiverter) tileEntity).modes[side];
|
||||
if(tileEntity instanceof TileEntityDivertionTransporter){
|
||||
int mode=((TileEntityDivertionTransporter) tileEntity).modes[side];
|
||||
boolean redstone=tileEntity.worldObj.isBlockIndirectlyGettingPowered(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
if((mode==2&&redstone==true)||(mode==1&&redstone==false)){
|
||||
continue;
|
||||
|
@ -147,8 +147,8 @@ public final class TransporterUtils
|
|||
}
|
||||
|
||||
//Check for logistical Diverter
|
||||
if(tile instanceof TileEntityLogisticalDiverter){
|
||||
int mode=((TileEntityLogisticalDiverter) tile).modes[ForgeDirection.VALID_DIRECTIONS[side].getOpposite().ordinal()];
|
||||
if(tile instanceof TileEntityDivertionTransporter){
|
||||
int mode=((TileEntityDivertionTransporter) tile).modes[ForgeDirection.VALID_DIRECTIONS[side].getOpposite().ordinal()];
|
||||
boolean redstone=tile.worldObj.isBlockIndirectlyGettingPowered(tile.xCoord, tile.yCoord, tile.zCoord);
|
||||
if((mode==2&&redstone==true)||(mode==1&&redstone==false)){
|
||||
continue;
|
||||
|
|
|
@ -66,6 +66,7 @@ tile.Transmitter.UniversalCable.name=Universal Cable
|
|||
tile.Transmitter.MechanicalPipe.name=Mechanical Pipe
|
||||
tile.Transmitter.LogisticalTransporter.name=Logistical Transporter
|
||||
tile.Transmitter.RestrictiveTransporter.name=Restrictive Transporter
|
||||
tile.Transmitter.DiversionTransporter.name=Diversion Transporter
|
||||
|
||||
//Energy Cubes
|
||||
tile.EnergyCube.Basic.name=Basic Energy Cube
|
||||
|
|
Loading…
Reference in a new issue