Rename Object3D to Coord4D, work on balloons
This commit is contained in:
parent
48af6f8fcc
commit
0ab803feeb
108 changed files with 652 additions and 622 deletions
|
@ -12,7 +12,7 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
public class Object3D
|
||||
public class Coord4D
|
||||
{
|
||||
public int xCoord;
|
||||
public int yCoord;
|
||||
|
@ -20,7 +20,7 @@ public class Object3D
|
|||
|
||||
public int dimensionId;
|
||||
|
||||
public Object3D(int x, int y, int z)
|
||||
public Coord4D(int x, int y, int z)
|
||||
{
|
||||
xCoord = x;
|
||||
yCoord = y;
|
||||
|
@ -29,7 +29,7 @@ public class Object3D
|
|||
dimensionId = 0;
|
||||
}
|
||||
|
||||
public Object3D(int x, int y, int z, int dimension)
|
||||
public Coord4D(int x, int y, int z, int dimension)
|
||||
{
|
||||
xCoord = x;
|
||||
yCoord = y;
|
||||
|
@ -75,7 +75,7 @@ public class Object3D
|
|||
data.add(zCoord);
|
||||
}
|
||||
|
||||
public Object3D translate(int x, int y, int z)
|
||||
public Coord4D translate(int x, int y, int z)
|
||||
{
|
||||
xCoord += x;
|
||||
yCoord += y;
|
||||
|
@ -84,34 +84,34 @@ public class Object3D
|
|||
return this;
|
||||
}
|
||||
|
||||
public Object3D getFromSide(ForgeDirection side)
|
||||
public Coord4D getFromSide(ForgeDirection side)
|
||||
{
|
||||
return new Object3D(xCoord+side.offsetX, yCoord+side.offsetY, zCoord+side.offsetZ, dimensionId);
|
||||
return new Coord4D(xCoord+side.offsetX, yCoord+side.offsetY, zCoord+side.offsetZ, dimensionId);
|
||||
}
|
||||
|
||||
public static Object3D get(TileEntity tileEntity)
|
||||
public static Coord4D get(TileEntity tileEntity)
|
||||
{
|
||||
return new Object3D(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord, tileEntity.worldObj.provider.dimensionId);
|
||||
return new Coord4D(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord, tileEntity.worldObj.provider.dimensionId);
|
||||
}
|
||||
|
||||
public static Object3D read(NBTTagCompound nbtTags)
|
||||
public static Coord4D read(NBTTagCompound nbtTags)
|
||||
{
|
||||
return new Object3D(nbtTags.getInteger("x"), nbtTags.getInteger("y"), nbtTags.getInteger("z"), nbtTags.getInteger("dimensionId"));
|
||||
return new Coord4D(nbtTags.getInteger("x"), nbtTags.getInteger("y"), nbtTags.getInteger("z"), nbtTags.getInteger("dimensionId"));
|
||||
}
|
||||
|
||||
public static Object3D read(ByteArrayDataInput dataStream)
|
||||
public static Coord4D read(ByteArrayDataInput dataStream)
|
||||
{
|
||||
return new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
return new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
}
|
||||
|
||||
public Object3D difference(Object3D other)
|
||||
public Coord4D difference(Coord4D other)
|
||||
{
|
||||
return new Object3D(xCoord-other.xCoord, yCoord-other.yCoord, zCoord-other.zCoord);
|
||||
return new Coord4D(xCoord-other.xCoord, yCoord-other.yCoord, zCoord-other.zCoord);
|
||||
}
|
||||
|
||||
public ForgeDirection sideDifference(Object3D other)
|
||||
public ForgeDirection sideDifference(Coord4D other)
|
||||
{
|
||||
Object3D diff = difference(other);
|
||||
Coord4D diff = difference(other);
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ public class Object3D
|
|||
return ForgeDirection.UNKNOWN;
|
||||
}
|
||||
|
||||
public int distanceTo(Object3D obj)
|
||||
public int distanceTo(Coord4D obj)
|
||||
{
|
||||
int subX = xCoord - obj.xCoord;
|
||||
int subY = yCoord - obj.yCoord;
|
||||
|
@ -137,7 +137,7 @@ public class Object3D
|
|||
return world.getBlockId(xCoord+side.offsetX, yCoord+side.offsetY, zCoord+side.offsetZ) == 0;
|
||||
}
|
||||
|
||||
public Object3D step(ForgeDirection side)
|
||||
public Coord4D step(ForgeDirection side)
|
||||
{
|
||||
return translate(side.offsetX, side.offsetY, side.offsetZ);
|
||||
}
|
||||
|
@ -152,6 +152,12 @@ public class Object3D
|
|||
return world.getChunkFromBlockCoords(xCoord >> 4, zCoord >> 4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Coord4D clone()
|
||||
{
|
||||
return new Coord4D(xCoord, yCoord, zCoord, dimensionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
@ -161,11 +167,11 @@ public class Object3D
|
|||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
return obj instanceof Object3D &&
|
||||
((Object3D)obj).xCoord == xCoord &&
|
||||
((Object3D)obj).yCoord == yCoord &&
|
||||
((Object3D)obj).zCoord == zCoord &&
|
||||
((Object3D)obj).dimensionId == dimensionId;
|
||||
return obj instanceof Coord4D &&
|
||||
((Coord4D)obj).xCoord == xCoord &&
|
||||
((Coord4D)obj).yCoord == yCoord &&
|
||||
((Coord4D)obj).zCoord == zCoord &&
|
||||
((Coord4D)obj).dimensionId == dimensionId;
|
||||
}
|
||||
|
||||
@Override
|
|
@ -1,6 +1,6 @@
|
|||
package mekanism.api.gas;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -25,7 +25,7 @@ public final class GasTransmission
|
|||
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tube = Object3D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
TileEntity tube = Coord4D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
|
||||
if(TransmissionType.checkTransmissionType(tube, TransmissionType.GAS, tileEntity))
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ public final class GasTransmission
|
|||
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity acceptor = Object3D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
TileEntity acceptor = Coord4D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
|
||||
if(acceptor instanceof IGasHandler)
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ public final class GasTransmission
|
|||
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity connection = Object3D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
TileEntity connection = Coord4D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
|
||||
if(canConnect(connection, orientation))
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ public final class GasTransmission
|
|||
*/
|
||||
public static int emitGasToNetwork(GasStack stack, TileEntity sender, ForgeDirection facing)
|
||||
{
|
||||
TileEntity pointer = Object3D.get(sender).getFromSide(facing).getTileEntity(sender.worldObj);
|
||||
TileEntity pointer = Coord4D.get(sender).getFromSide(facing).getTileEntity(sender.worldObj);
|
||||
|
||||
if(TransmissionType.checkTransmissionType(pointer, TransmissionType.GAS, sender))
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.NoSuchElementException;
|
|||
import java.util.Set;
|
||||
|
||||
import mekanism.api.IClientTicker;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -156,11 +156,11 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
{
|
||||
if(transmitter instanceof TileEntity)
|
||||
{
|
||||
NetworkFinder finder = new NetworkFinder(((TileEntity)transmitter).getWorldObj(), getTransmissionType(), Object3D.get((TileEntity)transmitter));
|
||||
List<Object3D> partNetwork = finder.exploreNetwork();
|
||||
NetworkFinder finder = new NetworkFinder(((TileEntity)transmitter).getWorldObj(), getTransmissionType(), Coord4D.get((TileEntity)transmitter));
|
||||
List<Coord4D> partNetwork = finder.exploreNetwork();
|
||||
Set<ITransmitter<N>> newTransporters = new HashSet<ITransmitter<N>>();
|
||||
|
||||
for(Object3D node : partNetwork)
|
||||
for(Coord4D node : partNetwork)
|
||||
{
|
||||
TileEntity nodeTile = node.getTileEntity(((TileEntity)transmitter).worldObj);
|
||||
|
||||
|
@ -191,7 +191,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity sideTile = Object3D.get((TileEntity)splitPoint).getFromSide(side).getTileEntity(((TileEntity)splitPoint).worldObj);
|
||||
TileEntity sideTile = Coord4D.get((TileEntity)splitPoint).getFromSide(side).getTileEntity(((TileEntity)splitPoint).worldObj);
|
||||
|
||||
if(sideTile != null)
|
||||
{
|
||||
|
@ -205,8 +205,8 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
|
||||
if(TransmissionType.checkTransmissionType(connectedBlockA, getTransmissionType()) && !dealtWith[count])
|
||||
{
|
||||
NetworkFinder finder = new NetworkFinder(((TileEntity)splitPoint).worldObj, getTransmissionType(), Object3D.get(connectedBlockA), Object3D.get((TileEntity)splitPoint));
|
||||
List<Object3D> partNetwork = finder.exploreNetwork();
|
||||
NetworkFinder finder = new NetworkFinder(((TileEntity)splitPoint).worldObj, getTransmissionType(), Coord4D.get(connectedBlockA), Coord4D.get((TileEntity)splitPoint));
|
||||
List<Coord4D> partNetwork = finder.exploreNetwork();
|
||||
|
||||
for(int check = count; check < connectedBlocks.length; check++)
|
||||
{
|
||||
|
@ -219,7 +219,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
|
||||
if(TransmissionType.checkTransmissionType(connectedBlockB, getTransmissionType()) && !dealtWith[check])
|
||||
{
|
||||
if(partNetwork.contains(Object3D.get(connectedBlockB)))
|
||||
if(partNetwork.contains(Coord4D.get(connectedBlockB)))
|
||||
{
|
||||
dealtWith[check] = true;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
|
||||
Set<ITransmitter<N>> newNetCables = new HashSet<ITransmitter<N>>();
|
||||
|
||||
for(Object3D node : finder.iterated)
|
||||
for(Coord4D node : finder.iterated)
|
||||
{
|
||||
TileEntity nodeTile = node.getTileEntity(((TileEntity)splitPoint).worldObj);
|
||||
|
||||
|
@ -324,12 +324,12 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
public TransmissionType transmissionType;
|
||||
|
||||
public World worldObj;
|
||||
public Object3D start;
|
||||
public Coord4D start;
|
||||
|
||||
public List<Object3D> iterated = new ArrayList<Object3D>();
|
||||
public List<Object3D> toIgnore = new ArrayList<Object3D>();
|
||||
public List<Coord4D> iterated = new ArrayList<Coord4D>();
|
||||
public List<Coord4D> toIgnore = new ArrayList<Coord4D>();
|
||||
|
||||
public NetworkFinder(World world, TransmissionType type, Object3D location, Object3D... ignore)
|
||||
public NetworkFinder(World world, TransmissionType type, Coord4D location, Coord4D... ignore)
|
||||
{
|
||||
worldObj = world;
|
||||
start = location;
|
||||
|
@ -345,7 +345,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
}
|
||||
}
|
||||
|
||||
public void loopAll(Object3D location)
|
||||
public void loopAll(Coord4D location)
|
||||
{
|
||||
if(TransmissionType.checkTransmissionType(location.getTileEntity(worldObj), transmissionType))
|
||||
{
|
||||
|
@ -357,7 +357,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
|
||||
for(ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
Object3D obj = location.getFromSide(direction);
|
||||
Coord4D obj = location.getFromSide(direction);
|
||||
|
||||
if(!iterated.contains(obj) && !toIgnore.contains(obj))
|
||||
{
|
||||
|
@ -374,7 +374,7 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
|||
}
|
||||
}
|
||||
|
||||
public List<Object3D> exploreNetwork()
|
||||
public List<Coord4D> exploreNetwork()
|
||||
{
|
||||
loopAll(start);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.HashSet;
|
|||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.tileentity.TileEntityDynamicTank;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -33,7 +33,7 @@ public class ThreadTankSparkle extends Thread
|
|||
try {
|
||||
if(Mekanism.dynamicTankEasterEgg)
|
||||
{
|
||||
MekanismClient.audioHandler.quickPlay("cj/CJ_" + (random.nextInt(3)+1) + ".ogg", pointer.worldObj, Object3D.get(pointer));
|
||||
MekanismClient.audioHandler.quickPlay("cj/CJ_" + (random.nextInt(3)+1) + ".ogg", pointer.worldObj, Coord4D.get(pointer));
|
||||
}
|
||||
|
||||
loop(pointer);
|
||||
|
@ -46,32 +46,32 @@ public class ThreadTankSparkle extends Thread
|
|||
|
||||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
if(Object3D.get(tileEntity).sideVisible(ForgeDirection.DOWN, world))
|
||||
if(Coord4D.get(tileEntity).sideVisible(ForgeDirection.DOWN, world))
|
||||
{
|
||||
world.spawnParticle("reddust", tileEntity.xCoord + random.nextDouble(), tileEntity.yCoord + -.01, tileEntity.zCoord + random.nextDouble(), 0, 0, 0);
|
||||
}
|
||||
|
||||
if(Object3D.get(tileEntity).sideVisible(ForgeDirection.UP, world))
|
||||
if(Coord4D.get(tileEntity).sideVisible(ForgeDirection.UP, world))
|
||||
{
|
||||
world.spawnParticle("reddust", tileEntity.xCoord + random.nextDouble(), tileEntity.yCoord + 1.01, tileEntity.zCoord + random.nextDouble(), 0, 0, 0);
|
||||
}
|
||||
|
||||
if(Object3D.get(tileEntity).sideVisible(ForgeDirection.NORTH, world))
|
||||
if(Coord4D.get(tileEntity).sideVisible(ForgeDirection.NORTH, world))
|
||||
{
|
||||
world.spawnParticle("reddust", tileEntity.xCoord + random.nextDouble(), tileEntity.yCoord + random.nextDouble(), tileEntity.zCoord + -.01, 0, 0, 0);
|
||||
}
|
||||
|
||||
if(Object3D.get(tileEntity).sideVisible(ForgeDirection.SOUTH, world))
|
||||
if(Coord4D.get(tileEntity).sideVisible(ForgeDirection.SOUTH, world))
|
||||
{
|
||||
world.spawnParticle("reddust", tileEntity.xCoord + random.nextDouble(), tileEntity.yCoord + random.nextDouble(), tileEntity.zCoord + 1.01, 0, 0, 0);
|
||||
}
|
||||
|
||||
if(Object3D.get(tileEntity).sideVisible(ForgeDirection.WEST, world))
|
||||
if(Coord4D.get(tileEntity).sideVisible(ForgeDirection.WEST, world))
|
||||
{
|
||||
world.spawnParticle("reddust", tileEntity.xCoord + -.01, tileEntity.yCoord + random.nextDouble(), tileEntity.zCoord + random.nextDouble(), 0, 0, 0);
|
||||
}
|
||||
|
||||
if(Object3D.get(tileEntity).sideVisible(ForgeDirection.EAST, world))
|
||||
if(Coord4D.get(tileEntity).sideVisible(ForgeDirection.EAST, world))
|
||||
{
|
||||
world.spawnParticle("reddust", tileEntity.xCoord + 1.01, tileEntity.yCoord + random.nextDouble(), tileEntity.zCoord + random.nextDouble(), 0, 0, 0);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class ThreadTankSparkle extends Thread
|
|||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tile = Object3D.get(tileEntity).getFromSide(side).getTileEntity(pointer.worldObj);
|
||||
TileEntity tile = Coord4D.get(tileEntity).getFromSide(side).getTileEntity(pointer.worldObj);
|
||||
|
||||
if(tile instanceof TileEntityDynamicTank && !iteratedNodes.contains(tile))
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.client.gui;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -121,7 +121,7 @@ public class GuiChemicalInfuser extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(0);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
else if(xAxis > 114 && xAxis < 132 && yAxis > 13 && yAxis < 21)
|
||||
|
@ -129,7 +129,7 @@ public class GuiChemicalInfuser extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(1);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.IInvConfiguration;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -252,19 +252,19 @@ public class GuiConfiguration extends GuiMekanism
|
|||
{
|
||||
int guiId = MachineType.get(tile.getBlockType().blockID, tile.getBlockMetadata()).guiId;
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketSimpleGui().setParams(Object3D.get(tile), guiId));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketSimpleGui().setParams(Coord4D.get(tile), guiId));
|
||||
}
|
||||
|
||||
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.EJECT, Object3D.get(tile)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.EJECT, Coord4D.get(tile)));
|
||||
}
|
||||
|
||||
if(xAxis >= 156 && xAxis <= 170 && yAxis >= 21 && yAxis <= 35)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.STRICT_INPUT, Object3D.get(tile)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.STRICT_INPUT, Coord4D.get(tile)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ public class GuiConfiguration extends GuiMekanism
|
|||
if(xAxis >= 80 && xAxis <= 96 && yAxis >= 49 && yAxis <= 65)
|
||||
{
|
||||
mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.EJECT_COLOR, Object3D.get(tile), button));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.EJECT_COLOR, Coord4D.get(tile), button));
|
||||
}
|
||||
|
||||
for(int i = 0; i < slotPosMap.size(); i++)
|
||||
|
@ -287,7 +287,7 @@ public class GuiConfiguration extends GuiMekanism
|
|||
if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.SIDE_DATA, Object3D.get(tile), button, i));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.SIDE_DATA, Coord4D.get(tile), button, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ public class GuiConfiguration extends GuiMekanism
|
|||
if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.INPUT_COLOR, Object3D.get(tile), button, i));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.INPUT_COLOR, Coord4D.get(tile), button, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IRedstoneControl;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -61,7 +61,7 @@ public class GuiConfigurationTab extends GuiElement
|
|||
{
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 10 && yAxis <= 28)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketSimpleGui().setParams(Object3D.get(tileEntity), 9));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketSimpleGui().setParams(Coord4D.get(tileEntity), 9));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.client.gui;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.inventory.container.ContainerDigitalMiner;
|
||||
|
@ -90,18 +90,18 @@ public class GuiDigitalMiner extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(3);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
}
|
||||
else if(guibutton.id == 1)
|
||||
{
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(4);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
}
|
||||
else if(guibutton.id == 2)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(0);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
}
|
||||
|
||||
if(xAxis >= 147 && xAxis <= 161 && yAxis >= 63 && yAxis <= 77)
|
||||
|
@ -290,7 +290,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(1);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
}
|
||||
|
||||
if(xAxis >= 131 && xAxis <= 145 && yAxis >= 47 && yAxis <= 61)
|
||||
|
@ -300,7 +300,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(5);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
}
|
||||
|
||||
if(xAxis >= 131 && xAxis <= 145 && yAxis >= 63 && yAxis <= 77)
|
||||
|
@ -310,7 +310,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(9);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
}
|
||||
|
||||
if(xAxis >= 144 && xAxis <= 160 && yAxis >= 27 && yAxis <= 43)
|
||||
|
@ -349,7 +349,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
|||
data.add(true);
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
}
|
||||
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
|
@ -169,12 +169,12 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
|||
if(filter instanceof MItemStackFilter)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER_INDEX, Object3D.get(tileEntity), 1, getFilterIndex()+i));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER_INDEX, Coord4D.get(tileEntity), 1, getFilterIndex()+i));
|
||||
}
|
||||
else if(filter instanceof MOreDictFilter)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER_INDEX, Object3D.get(tileEntity), 2, getFilterIndex()+i));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER_INDEX, Coord4D.get(tileEntity), 2, getFilterIndex()+i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
|||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 3));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 3));
|
||||
}
|
||||
|
||||
if(xAxis >= 39 && xAxis <= 50 && yAxis >= 67 && yAxis <= 78)
|
||||
|
@ -268,11 +268,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
|||
|
||||
if(guibutton.id == 0)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 1));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 1));
|
||||
}
|
||||
else if(guibutton.id == 1)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 2));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -460,7 +460,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
|||
data.add(6);
|
||||
data.add(toUse);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
|
||||
radiusField.setText("");
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
|||
data.add(7);
|
||||
data.add(toUse);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
|
||||
minField.setText("");
|
||||
}
|
||||
|
@ -492,7 +492,7 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
|||
data.add(8);
|
||||
data.add(toUse);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
|
||||
maxField.setText("");
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.common.IElectricChest;
|
||||
import mekanism.common.Mekanism;
|
||||
|
@ -124,7 +124,7 @@ public class GuiElectricChest extends GuiContainer
|
|||
|
||||
if(isBlock)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketElectricChest().setParams(ElectricChestPacketType.LOCK, !getLocked(), true, Object3D.get(tileEntity)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketElectricChest().setParams(ElectricChestPacketType.LOCK, !getLocked(), true, Coord4D.get(tileEntity)));
|
||||
}
|
||||
else {
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketElectricChest().setParams(ElectricChestPacketType.LOCK, !getLocked(), false));
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -162,12 +162,12 @@ public class GuiLogisticalSorter extends GuiMekanism
|
|||
if(filter instanceof TItemStackFilter)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER_INDEX, Object3D.get(tileEntity), 1, getFilterIndex()+i));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER_INDEX, Coord4D.get(tileEntity), 1, getFilterIndex()+i));
|
||||
}
|
||||
else if(filter instanceof TOreDictFilter)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER_INDEX, Object3D.get(tileEntity), 2, getFilterIndex()+i));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER_INDEX, Coord4D.get(tileEntity), 2, getFilterIndex()+i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ public class GuiLogisticalSorter extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(1);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ public class GuiLogisticalSorter extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(2);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ public class GuiLogisticalSorter extends GuiMekanism
|
|||
data.add(0);
|
||||
data.add(button);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
@ -254,11 +254,11 @@ public class GuiLogisticalSorter extends GuiMekanism
|
|||
|
||||
if(guibutton.id == 0)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Object3D.get(tileEntity), 1));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 1));
|
||||
}
|
||||
else if(guibutton.id == 1)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Object3D.get(tileEntity), 2));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.inventory.container.ContainerFilter;
|
||||
|
@ -82,13 +82,13 @@ public class GuiMItemStackFilter extends GuiMekanism
|
|||
{
|
||||
if(isNew)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketNewFilter().setParams(Object3D.get(tileEntity), filter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketNewFilter().setParams(Coord4D.get(tileEntity), filter));
|
||||
}
|
||||
else {
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Object3D.get(tileEntity), false, origFilter, filter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Coord4D.get(tileEntity), false, origFilter, filter));
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
else if(filter.itemType == null)
|
||||
{
|
||||
|
@ -98,8 +98,8 @@ public class GuiMItemStackFilter extends GuiMekanism
|
|||
}
|
||||
else if(guibutton.id == 1)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Object3D.get(tileEntity), true, origFilter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Coord4D.get(tileEntity), true, origFilter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ public class GuiMItemStackFilter extends GuiMekanism
|
|||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35)
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.inventory.container.ContainerFilter;
|
||||
|
@ -127,13 +127,13 @@ public class GuiMOreDictFilter extends GuiMekanism
|
|||
{
|
||||
if(isNew)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketNewFilter().setParams(Object3D.get(tileEntity), filter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketNewFilter().setParams(Coord4D.get(tileEntity), filter));
|
||||
}
|
||||
else {
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Object3D.get(tileEntity), false, origFilter, filter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Coord4D.get(tileEntity), false, origFilter, filter));
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
else {
|
||||
status = EnumColor.DARK_RED + "No key";
|
||||
|
@ -142,8 +142,8 @@ public class GuiMOreDictFilter extends GuiMekanism
|
|||
}
|
||||
else if(guibutton.id == 1)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Object3D.get(tileEntity), true, origFilter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Coord4D.get(tileEntity), true, origFilter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ public class GuiMOreDictFilter extends GuiMekanism
|
|||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDigitalMinerGui().setParams(MinerGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
|
||||
if(xAxis >= 131 && xAxis <= 143 && yAxis >= 47 && yAxis <= 59)
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.client.gui;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.inventory.container.ContainerMetallurgicInfuser;
|
||||
|
@ -94,7 +94,7 @@ public class GuiMetallurgicInfuser extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(0);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.common.IElectricChest;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -136,7 +136,7 @@ public class GuiPasswordEnter extends GuiScreen
|
|||
if(isBlock)
|
||||
{
|
||||
tileEntity.setEnergy(tileEntity.getEnergy() - 100);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketElectricChest().setParams(ElectricChestPacketType.SERVER_OPEN, true, true, Object3D.get(tileEntity)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketElectricChest().setParams(ElectricChestPacketType.SERVER_OPEN, true, true, Coord4D.get(tileEntity)));
|
||||
}
|
||||
else {
|
||||
((IEnergizedItem)itemStack.getItem()).setEnergy(itemStack, ((IEnergizedItem)itemStack.getItem()).getEnergy(itemStack) - 100);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IElectricChest;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -163,8 +163,8 @@ public class GuiPasswordModify extends GuiScreen
|
|||
else {
|
||||
if(isBlock)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketElectricChest().setParams(ElectricChestPacketType.PASSWORD, confirmPasswordField.getText(), true, Object3D.get(tileEntity)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketElectricChest().setParams(ElectricChestPacketType.SERVER_OPEN, false, true, Object3D.get(tileEntity)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketElectricChest().setParams(ElectricChestPacketType.PASSWORD, confirmPasswordField.getText(), true, Coord4D.get(tileEntity)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketElectricChest().setParams(ElectricChestPacketType.SERVER_OPEN, false, true, Coord4D.get(tileEntity)));
|
||||
}
|
||||
else {
|
||||
((IElectricChest)itemStack.getItem()).setPassword(itemStack, confirmPasswordField.getText());
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IRedstoneControl;
|
||||
import mekanism.common.IRedstoneControl.RedstoneControl;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -71,7 +71,7 @@ public class GuiRedstoneControl extends GuiElement
|
|||
int ordinalToSet = current.ordinal() < (RedstoneControl.values().length-1) ? current.ordinal()+1 : 0;
|
||||
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRedstoneControl().setParams(Object3D.get(tileEntity), RedstoneControl.values()[ordinalToSet]));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRedstoneControl().setParams(Coord4D.get(tileEntity), RedstoneControl.values()[ordinalToSet]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.client.gui;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -127,7 +127,7 @@ public class GuiRotaryCondensentrator extends GuiMekanism
|
|||
ArrayList data = new ArrayList();
|
||||
data.add(0);
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.client.gui;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
|
@ -65,7 +65,7 @@ public class GuiSortingTab extends GuiElement
|
|||
{
|
||||
ArrayList data = new ArrayList();
|
||||
data.add(0);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -103,13 +103,13 @@ public class GuiTItemStackFilter extends GuiMekanism
|
|||
|
||||
if(isNew)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketNewFilter().setParams(Object3D.get(tileEntity), filter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketNewFilter().setParams(Coord4D.get(tileEntity), filter));
|
||||
}
|
||||
else {
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Object3D.get(tileEntity), false, origFilter, filter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Coord4D.get(tileEntity), false, origFilter, filter));
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
else if(min > max)
|
||||
{
|
||||
|
@ -135,8 +135,8 @@ public class GuiTItemStackFilter extends GuiMekanism
|
|||
}
|
||||
else if(guibutton.id == 1)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Object3D.get(tileEntity), true, origFilter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Coord4D.get(tileEntity), true, origFilter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -293,7 +293,7 @@ public class GuiTItemStackFilter extends GuiMekanism
|
|||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35)
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -131,13 +131,13 @@ public class GuiTOreDictFilter extends GuiMekanism
|
|||
{
|
||||
if(isNew)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketNewFilter().setParams(Object3D.get(tileEntity), filter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketNewFilter().setParams(Coord4D.get(tileEntity), filter));
|
||||
}
|
||||
else {
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Object3D.get(tileEntity), false, origFilter, filter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Coord4D.get(tileEntity), false, origFilter, filter));
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
else {
|
||||
status = EnumColor.DARK_RED + MekanismUtils.localize("gui.oredictFilter.noKey");
|
||||
|
@ -146,8 +146,8 @@ public class GuiTOreDictFilter extends GuiMekanism
|
|||
}
|
||||
else if(guibutton.id == 1)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Object3D.get(tileEntity), true, origFilter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketEditFilter().setParams(Coord4D.get(tileEntity), true, origFilter));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ public class GuiTOreDictFilter extends GuiMekanism
|
|||
if(xAxis >= 5 && xAxis <= 16 && yAxis >= 5 && yAxis <= 16)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Object3D.get(tileEntity), 0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketLogisticalSorterGui().setParams(SorterGuiPacket.SERVER, Coord4D.get(tileEntity), 0));
|
||||
}
|
||||
|
||||
if(xAxis >= 131 && xAxis <= 143 && yAxis >= 47 && yAxis <= 59)
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.client.gui;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.inventory.container.ContainerTeleporter;
|
||||
|
@ -61,7 +61,7 @@ public class GuiTeleporter extends GuiMekanism
|
|||
data.add(0);
|
||||
data.add(getIncrementedNumber(tileEntity.code.digitOne));
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
tileEntity.code.digitOne = getIncrementedNumber(tileEntity.code.digitOne);
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class GuiTeleporter extends GuiMekanism
|
|||
data.add(1);
|
||||
data.add(getIncrementedNumber(tileEntity.code.digitTwo));
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
tileEntity.code.digitTwo = getIncrementedNumber(tileEntity.code.digitTwo);
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public class GuiTeleporter extends GuiMekanism
|
|||
data.add(2);
|
||||
data.add(getIncrementedNumber(tileEntity.code.digitThree));
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
tileEntity.code.digitThree = getIncrementedNumber(tileEntity.code.digitThree);
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class GuiTeleporter extends GuiMekanism
|
|||
data.add(3);
|
||||
data.add(getIncrementedNumber(tileEntity.code.digitFour));
|
||||
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Coord4D.get(tileEntity), data));
|
||||
tileEntity.code.digitFour = getIncrementedNumber(tileEntity.code.digitFour);
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package mekanism.client.gui;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IUpgradeTile;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -79,13 +79,13 @@ public class GuiUpgradeManagement extends GuiElement
|
|||
if(xAxis >= 179 && xAxis <= 198 && yAxis >= 47 && yAxis <= 54)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRemoveUpgrade().setParams(Object3D.get(tileEntity), (byte)0));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRemoveUpgrade().setParams(Coord4D.get(tileEntity), (byte)0));
|
||||
}
|
||||
|
||||
if(xAxis >= 179 && xAxis <= 198 && yAxis >= 57 && yAxis <= 64)
|
||||
{
|
||||
mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F);
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRemoveUpgrade().setParams(Object3D.get(tileEntity), (byte)1));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketRemoveUpgrade().setParams(Coord4D.get(tileEntity), (byte)1));
|
||||
}
|
||||
|
||||
if(xAxis >= 180 && xAxis <= 196 && yAxis >= 11 && yAxis <= 27)
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Random;
|
|||
import java.util.Set;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.item.ItemJetpack;
|
||||
import mekanism.common.item.ItemScubaTank;
|
||||
|
@ -57,7 +57,7 @@ public class RenderTickHandler implements ITickHandler
|
|||
int y = MathHelper.floor_double(pos.blockY);
|
||||
int z = MathHelper.floor_double(pos.blockZ);
|
||||
|
||||
Object3D obj = new Object3D(x, y, z);
|
||||
Coord4D obj = new Coord4D(x, y, z);
|
||||
|
||||
if(Mekanism.debug && mc.currentScreen == null && !mc.gameSettings.showDebugInfo)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package mekanism.client.render.tileentity;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.tileentity.TileEntityBin;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
|
@ -46,7 +46,7 @@ public class RenderBin extends TileEntitySpecialRenderer
|
|||
amount = Integer.toString(tileEntity.clientAmount);
|
||||
}
|
||||
|
||||
Object3D obj = Object3D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(tileEntity.facing));
|
||||
Coord4D obj = Coord4D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(tileEntity.facing));
|
||||
|
||||
if(tileEntity.worldObj.isBlockSolidOnSide(obj.xCoord, obj.yCoord, obj.zCoord, ForgeDirection.getOrientation(tileEntity.facing).getOpposite()))
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ public class RenderBin extends TileEntitySpecialRenderer
|
|||
}
|
||||
}
|
||||
|
||||
private void doLight(World world, Object3D obj)
|
||||
private void doLight(World world, Coord4D obj)
|
||||
{
|
||||
if(world.isBlockOpaqueCube(obj.xCoord, obj.yCoord, obj.zCoord))
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.client.render.tileentity;
|
|||
import java.util.HashMap;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.client.render.MekanismRenderer.DisplayInteger;
|
||||
import mekanism.client.render.MekanismRenderer.Model3D;
|
||||
|
@ -56,7 +56,7 @@ public class RenderConfigurableMachine extends TileEntitySpecialRenderer
|
|||
int yPos = MathHelper.floor_double(pos.blockY);
|
||||
int zPos = MathHelper.floor_double(pos.blockZ);
|
||||
|
||||
Object3D obj = new Object3D(xPos, yPos, zPos);
|
||||
Coord4D obj = new Coord4D(xPos, yPos, zPos);
|
||||
|
||||
if(xPos == tileEntity.xCoord && yPos == tileEntity.yCoord && zPos == tileEntity.zCoord)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.client.render.tileentity;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.client.render.MekanismRenderer.DisplayInteger;
|
||||
import mekanism.client.render.MekanismRenderer.Model3D;
|
||||
|
@ -294,7 +294,7 @@ public class RenderDynamicTank extends TileEntitySpecialRenderer
|
|||
|
||||
public static class RenderData
|
||||
{
|
||||
public Object3D location;
|
||||
public Coord4D location;
|
||||
|
||||
public int height;
|
||||
public int length;
|
||||
|
@ -322,7 +322,7 @@ public class RenderDynamicTank extends TileEntitySpecialRenderer
|
|||
public static class ValveRenderData extends RenderData
|
||||
{
|
||||
public ForgeDirection side;
|
||||
public Object3D valveLocation;
|
||||
public Coord4D valveLocation;
|
||||
|
||||
public static ValveRenderData get(RenderData renderData, ValveData valveData)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.client.render.tileentity;
|
|||
|
||||
import java.util.HashMap;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.model.ModelTransmitter;
|
||||
import mekanism.client.model.ModelTransmitter.Size;
|
||||
import mekanism.client.model.ModelTransporterBox;
|
||||
|
@ -59,7 +59,7 @@ public class RenderLogisticalTransporter extends TileEntitySpecialRenderer
|
|||
|
||||
public void renderAModelAt(TileEntityLogisticalTransporter tileEntity, double x, double y, double z, float partialTick)
|
||||
{
|
||||
int meta = Object3D.get(tileEntity).getMetadata(tileEntity.worldObj);
|
||||
int meta = Coord4D.get(tileEntity).getMetadata(tileEntity.worldObj);
|
||||
|
||||
if(meta == 3)
|
||||
{
|
||||
|
@ -145,9 +145,9 @@ public class RenderLogisticalTransporter extends TileEntitySpecialRenderer
|
|||
int yPos = MathHelper.floor_double(pos.blockY);
|
||||
int zPos = MathHelper.floor_double(pos.blockZ);
|
||||
|
||||
Object3D obj = new Object3D(xPos, yPos, zPos);
|
||||
Coord4D obj = new Coord4D(xPos, yPos, zPos);
|
||||
|
||||
if(obj.equals(Object3D.get(tileEntity)))
|
||||
if(obj.equals(Coord4D.get(tileEntity)))
|
||||
{
|
||||
int mode = ((TileEntityDiversionTransporter)tileEntity).modes[pos.sideHit];
|
||||
ForgeDirection side = ForgeDirection.getOrientation(pos.sideHit);
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.client.render.tileentity;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasTransmission;
|
||||
import mekanism.api.gas.ITubeConnection;
|
||||
|
@ -75,7 +75,7 @@ public class RenderPressurizedTube extends TileEntitySpecialRenderer
|
|||
|
||||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
TileEntity sideTile = Object3D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(i)).getTileEntity(tileEntity.worldObj);
|
||||
TileEntity sideTile = Coord4D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(i)).getTileEntity(tileEntity.worldObj);
|
||||
|
||||
if(sideTile instanceof TileEntityGasTank && i != 0 && i != 1)
|
||||
{
|
||||
|
@ -128,7 +128,7 @@ public class RenderPressurizedTube extends TileEntitySpecialRenderer
|
|||
{
|
||||
if(connectable[i])
|
||||
{
|
||||
Object3D obj = Object3D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(i));
|
||||
Coord4D obj = Coord4D.get(tileEntity).getFromSide(ForgeDirection.getOrientation(i));
|
||||
Block b = Block.blocksList[obj.getBlockId(tileEntity.worldObj)];
|
||||
b.setBlockBoundsBasedOnState(tileEntity.worldObj, obj.xCoord, obj.yCoord, obj.zCoord);
|
||||
getListAndRender(ForgeDirection.getOrientation(i), gasType, b).render();
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.client.render.tileentity;
|
|||
import java.util.HashMap;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.client.render.MekanismRenderer.DisplayInteger;
|
||||
|
@ -39,7 +39,7 @@ public class RenderTeleporter extends TileEntitySpecialRenderer
|
|||
bindTexture(MekanismRenderer.getBlocksTexture());
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
|
||||
Object3D obj = Object3D.get(tileEntity).getFromSide(ForgeDirection.WEST);
|
||||
Coord4D obj = Coord4D.get(tileEntity).getFromSide(ForgeDirection.WEST);
|
||||
int type = 0;
|
||||
|
||||
if(obj.getBlockId(tileEntity.worldObj) == Mekanism.basicBlockID && obj.getMetadata(tileEntity.worldObj) == 7)
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Random;
|
|||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -282,7 +282,7 @@ public class SoundHandler
|
|||
* @param world - world to play in
|
||||
* @param object - location to play
|
||||
*/
|
||||
public void quickPlay(String soundPath, World world, Object3D object)
|
||||
public void quickPlay(String soundPath, World world, Coord4D object)
|
||||
{
|
||||
URL url = getClass().getClassLoader().getResource("assets/mekanism/sound/" + soundPath);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.HashMap;
|
|||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.tileentity.TileEntityDynamicTank;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -24,7 +24,7 @@ public class CommonWorldTickHandler implements ITickHandler
|
|||
if(tickData[0] instanceof World)
|
||||
{
|
||||
ArrayList<Integer> idsToKill = new ArrayList<Integer>();
|
||||
HashMap<Integer, HashSet<Object3D>> tilesToKill = new HashMap<Integer, HashSet<Object3D>>();
|
||||
HashMap<Integer, HashSet<Coord4D>> tilesToKill = new HashMap<Integer, HashSet<Coord4D>>();
|
||||
|
||||
World world = (World)tickData[0];
|
||||
|
||||
|
@ -34,7 +34,7 @@ public class CommonWorldTickHandler implements ITickHandler
|
|||
{
|
||||
int inventoryID = entry.getKey();
|
||||
|
||||
for(Object3D obj : entry.getValue().locations)
|
||||
for(Coord4D obj : entry.getValue().locations)
|
||||
{
|
||||
if(obj.dimensionId == world.provider.dimensionId)
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ public class CommonWorldTickHandler implements ITickHandler
|
|||
{
|
||||
if(!tilesToKill.containsKey(inventoryID))
|
||||
{
|
||||
tilesToKill.put(inventoryID, new HashSet<Object3D>());
|
||||
tilesToKill.put(inventoryID, new HashSet<Coord4D>());
|
||||
}
|
||||
|
||||
tilesToKill.get(inventoryID).add(obj);
|
||||
|
@ -58,9 +58,9 @@ public class CommonWorldTickHandler implements ITickHandler
|
|||
}
|
||||
}
|
||||
|
||||
for(Map.Entry<Integer, HashSet<Object3D>> entry : tilesToKill.entrySet())
|
||||
for(Map.Entry<Integer, HashSet<Coord4D>> entry : tilesToKill.entrySet())
|
||||
{
|
||||
for(Object3D obj : entry.getValue())
|
||||
for(Coord4D obj : entry.getValue())
|
||||
{
|
||||
Mekanism.dynamicInventories.get(entry.getKey()).locations.remove(obj);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public class CommonWorldTickHandler implements ITickHandler
|
|||
|
||||
for(int inventoryID : idsToKill)
|
||||
{
|
||||
for(Object3D obj : Mekanism.dynamicInventories.get(inventoryID).locations)
|
||||
for(Coord4D obj : Mekanism.dynamicInventories.get(inventoryID).locations)
|
||||
{
|
||||
TileEntityDynamicTank dynamicTank = (TileEntityDynamicTank)obj.getTileEntity(world);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
@ -91,15 +91,15 @@ public class ConnectedTextureRenderer
|
|||
int side0 = sideEdges[side][((face + 3) % 4)];
|
||||
int side1 = sideEdges[side][face];
|
||||
|
||||
if(!canConnect(world, new Object3D(x, y, z), sideEdges[side][face], side))
|
||||
if(!canConnect(world, new Coord4D(x, y, z), sideEdges[side][face], side))
|
||||
{
|
||||
map |= (7 << face * 2) % 256 | 7 >>> 8 - face * 2;
|
||||
}
|
||||
else if(!canConnect(world, new Object3D(x, y, z).getFromSide(ForgeDirection.getOrientation(side0)), side1, side))
|
||||
else if(!canConnect(world, new Coord4D(x, y, z).getFromSide(ForgeDirection.getOrientation(side0)), side1, side))
|
||||
{
|
||||
map |= 1 << face * 2;
|
||||
}
|
||||
else if(!canConnect(world, new Object3D(x, y, z).getFromSide(ForgeDirection.getOrientation(side1)), side0, side))
|
||||
else if(!canConnect(world, new Coord4D(x, y, z).getFromSide(ForgeDirection.getOrientation(side1)), side0, side))
|
||||
{
|
||||
map |= 1 << face * 2;
|
||||
}
|
||||
|
@ -108,10 +108,10 @@ public class ConnectedTextureRenderer
|
|||
return glassMap.get(map);
|
||||
}
|
||||
|
||||
private boolean canConnect(IBlockAccess access, Object3D obj, int side, int face)
|
||||
private boolean canConnect(IBlockAccess access, Coord4D obj, int side, int face)
|
||||
{
|
||||
Object3D block = obj.getFromSide(ForgeDirection.getOrientation(side));
|
||||
Object3D blockabove = obj.getFromSide(ForgeDirection.getOrientation(face));
|
||||
Coord4D block = obj.getFromSide(ForgeDirection.getOrientation(side));
|
||||
Coord4D blockabove = obj.getFromSide(ForgeDirection.getOrientation(face));
|
||||
|
||||
return (block.getBlockId(access) == blockID && block.getMetadata(access) == metadata) && (blockabove.getBlockId(access) != blockID || blockabove.getMetadata(access) != metadata);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public class ConnectedTextureRenderer
|
|||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldRenderSide(IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
Object3D obj = new Object3D(x, y, z).getFromSide(ForgeDirection.getOrientation(side).getOpposite());
|
||||
Coord4D obj = new Coord4D(x, y, z).getFromSide(ForgeDirection.getOrientation(side).getOpposite());
|
||||
return obj.getBlockId(world) != blockID || obj.getMetadata(world) != metadata;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package mekanism.common;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.SynchronizedTankData.ValveData;
|
||||
import mekanism.common.tileentity.TileEntityDynamicTank;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
@ -128,7 +128,7 @@ public class DynamicFluidTank implements IFluidTank
|
|||
{
|
||||
for(ValveData data : dynamicTank.structure.valves)
|
||||
{
|
||||
if(data.location.equals(Object3D.get(dynamicTank)))
|
||||
if(data.location.equals(Coord4D.get(dynamicTank)))
|
||||
{
|
||||
data.serverFluid = value;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common;
|
|||
|
||||
import java.util.HashSet;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
|
@ -11,5 +11,5 @@ public class DynamicTankCache
|
|||
public ItemStack[] inventory = new ItemStack[2];
|
||||
public FluidStack fluid;
|
||||
|
||||
public HashSet<Object3D> locations = new HashSet<Object3D>();
|
||||
public HashSet<Coord4D> locations = new HashSet<Coord4D>();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package mekanism.common;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.particle.EntityReddustFX;
|
||||
|
@ -19,7 +19,7 @@ import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
|||
public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
||||
{
|
||||
public EnumColor color = EnumColor.DARK_BLUE;
|
||||
public Object3D latched;
|
||||
public Coord4D latched;
|
||||
|
||||
public EntityBalloon(World world)
|
||||
{
|
||||
|
@ -46,12 +46,12 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
|||
color = c;
|
||||
}
|
||||
|
||||
public EntityBalloon(World world, Object3D obj, EnumColor c)
|
||||
public EntityBalloon(World world, Coord4D obj, EnumColor c)
|
||||
{
|
||||
this(world);
|
||||
|
||||
latched = obj;
|
||||
setPosition(latched.xCoord + 0.5F, latched.yCoord + 3F, latched.zCoord + 0.5F);
|
||||
setPosition(latched.xCoord + 0.5F, latched.yCoord + 2.8F, latched.zCoord + 0.5F);
|
||||
|
||||
prevPosX = posX;
|
||||
prevPosY = posY;
|
||||
|
@ -136,7 +136,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
|||
@Override
|
||||
public boolean canBeCollidedWith()
|
||||
{
|
||||
return !isDead && latched == null;
|
||||
return !isDead;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -155,7 +155,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
|||
|
||||
if(nbtTags.hasKey("latched"))
|
||||
{
|
||||
latched = Object3D.read(nbtTags);
|
||||
latched = Coord4D.read(nbtTags);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
|||
|
||||
if(data.readBoolean())
|
||||
{
|
||||
latched = new Object3D(data.readInt(), data.readInt(), data.readInt());
|
||||
latched = new Coord4D(data.readInt(), data.readInt(), data.readInt());
|
||||
}
|
||||
else {
|
||||
latched = null;
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.math.BigDecimal;
|
|||
import java.math.RoundingMode;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.EnergizedItemManager;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.common.item.ItemConfigurator;
|
||||
|
@ -41,7 +41,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
|||
{
|
||||
public double MAX_ELECTRICITY = 100000;
|
||||
|
||||
public Object3D homeLocation;
|
||||
public Coord4D homeLocation;
|
||||
|
||||
public ItemStack[] inventory = new ItemStack[31];
|
||||
|
||||
|
@ -461,7 +461,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
|||
|
||||
setDropPickup(nbtTags.getBoolean("dropPickup"));
|
||||
|
||||
homeLocation = Object3D.read(nbtTags);
|
||||
homeLocation = Coord4D.read(nbtTags);
|
||||
|
||||
NBTTagList tagList = nbtTags.getTagList("Items");
|
||||
inventory = new ItemStack[getSizeInventory()];
|
||||
|
@ -499,7 +499,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
|||
@Override
|
||||
protected void onDeathUpdate() {}
|
||||
|
||||
public void setHome(Object3D home)
|
||||
public void setHome(Coord4D home)
|
||||
{
|
||||
homeLocation = home;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import universalelectricity.core.block.IElectrical;
|
|||
import universalelectricity.core.block.IElectricalStorage;
|
||||
import buildcraft.api.power.IPowerReceptor;
|
||||
import cofh.api.energy.IEnergyHandler;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.IStrictEnergyAcceptor;
|
||||
import mekanism.api.energy.IStrictEnergyStorage;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
|
@ -15,9 +15,9 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public interface IAdvancedBoundingBlock extends IBoundingBlock, ISidedInventory, IEnergySink, IStrictEnergyAcceptor, IPowerReceptor, IEnergyTile, IElectrical, IElectricalStorage, IConnector, IStrictEnergyStorage, IEnergyHandler
|
||||
{
|
||||
public int[] getBoundSlots(Object3D location, int side);
|
||||
public int[] getBoundSlots(Coord4D location, int side);
|
||||
|
||||
public boolean canBoundInsert(Object3D location, int i, ItemStack itemstack);
|
||||
public boolean canBoundInsert(Coord4D location, int i, ItemStack itemstack);
|
||||
|
||||
public boolean canBoundExtract(Object3D location, int i, ItemStack itemstack, int j);
|
||||
public boolean canBoundExtract(Coord4D location, int i, ItemStack itemstack, int j);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package mekanism.common;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||
import mekanism.common.transporter.TransporterStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -9,7 +9,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
|
||||
public interface ILogisticalTransporter
|
||||
{
|
||||
public ItemStack insert(Object3D original, ItemStack itemStack, EnumColor color, boolean doEmit, int min);
|
||||
public ItemStack insert(Coord4D original, ItemStack itemStack, EnumColor color, boolean doEmit, int min);
|
||||
|
||||
public ItemStack insertRR(TileEntityLogisticalSorter outputter, ItemStack itemStack, EnumColor color, boolean doEmit, int min);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.util.Set;
|
|||
import java.util.logging.Logger;
|
||||
|
||||
import mekanism.api.ChemicalInput;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasNetwork.GasTransferEvent;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
|
@ -162,7 +162,7 @@ public class Mekanism
|
|||
public static Version versionNumber = new Version(5, 6, 0);
|
||||
|
||||
/** Map of Teleporters */
|
||||
public static Map<Teleporter.Code, ArrayList<Object3D>> teleporters = new HashMap<Teleporter.Code, ArrayList<Object3D>>();
|
||||
public static Map<Teleporter.Code, ArrayList<Coord4D>> teleporters = new HashMap<Teleporter.Code, ArrayList<Coord4D>>();
|
||||
|
||||
/** A map containing references to all dynamic tank inventory caches. */
|
||||
public static Map<Integer, DynamicTankCache> dynamicInventories = new HashMap<Integer, DynamicTankCache>();
|
||||
|
@ -190,7 +190,7 @@ public class Mekanism
|
|||
public static Set<String> jetpackOn = new HashSet<String>();
|
||||
public static Set<String> gasmaskOn = new HashSet<String>();
|
||||
|
||||
public static Set<Object3D> ic2Registered = new HashSet<Object3D>();
|
||||
public static Set<Coord4D> ic2Registered = new HashSet<Coord4D>();
|
||||
|
||||
//Block IDs
|
||||
public static int basicBlockID;
|
||||
|
@ -1347,7 +1347,7 @@ public class Mekanism
|
|||
public void onNetworkClientRequest(NetworkClientRequest event)
|
||||
{
|
||||
try {
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Object3D.get(event.tileEntity)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Coord4D.get(event.tileEntity)));
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.io.DataOutputStream;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.network.IMekanismPacket;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -184,7 +184,7 @@ public class PacketHandler implements IPacketHandler
|
|||
PacketDispatcher.sendPacketToAllPlayers(packet);
|
||||
break;
|
||||
case CLIENTS_RANGE:
|
||||
Object3D obj = (Object3D)transParams[0];
|
||||
Coord4D obj = (Coord4D)transParams[0];
|
||||
PacketDispatcher.sendPacketToAllAround(obj.xCoord, obj.yCoord, obj.zCoord, (Double)transParams[1], obj.dimensionId, packet);
|
||||
break;
|
||||
case CLIENTS_DIM:
|
||||
|
|
|
@ -3,14 +3,14 @@ package mekanism.common;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class SynchronizedTankData
|
||||
{
|
||||
public Set<Object3D> locations = new HashSet<Object3D>();
|
||||
public Set<Coord4D> locations = new HashSet<Coord4D>();
|
||||
|
||||
public int volLength;
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class SynchronizedTankData
|
|||
|
||||
public boolean hasRenderer;
|
||||
|
||||
public Object3D renderLocation;
|
||||
public Coord4D renderLocation;
|
||||
|
||||
public Set<ValveData> valves = new HashSet<ValveData>();
|
||||
|
||||
|
@ -75,7 +75,7 @@ public class SynchronizedTankData
|
|||
public static class ValveData
|
||||
{
|
||||
public ForgeDirection side;
|
||||
public Object3D location;
|
||||
public Coord4D location;
|
||||
public boolean serverFluid;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.SynchronizedTankData.ValveData;
|
||||
import mekanism.common.tileentity.TileEntityDynamicTank;
|
||||
import mekanism.common.tileentity.TileEntityDynamicValve;
|
||||
|
@ -45,7 +45,7 @@ public class TankUpdateProtocol
|
|||
boolean rightBlocks = true;
|
||||
boolean rightFrame = true;
|
||||
|
||||
Set<Object3D> locations = new HashSet<Object3D>();
|
||||
Set<Coord4D> locations = new HashSet<Coord4D>();
|
||||
|
||||
int xmin = 0, xmax = 0, ymin = 0, ymax = 0, zmin = 0, zmax = 0;
|
||||
|
||||
|
@ -141,13 +141,13 @@ public class TankUpdateProtocol
|
|||
rightBlocks = false;
|
||||
break;
|
||||
}
|
||||
else if(isFrame(Object3D.get(tile).translate(x, y, z), origX+xmin, origX+xmax, origY+ymin, origY+ymax, origZ+zmin, origZ+zmax) && !isValidFrame(origX+x, origY+y, origZ+z))
|
||||
else if(isFrame(Coord4D.get(tile).translate(x, y, z), origX+xmin, origX+xmax, origY+ymin, origY+ymax, origZ+zmin, origZ+zmax) && !isValidFrame(origX+x, origY+y, origZ+z))
|
||||
{
|
||||
rightFrame = false;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
locations.add(Object3D.get(tile).translate(x, y, z));
|
||||
locations.add(Coord4D.get(tile).translate(x, y, z));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -184,9 +184,9 @@ public class TankUpdateProtocol
|
|||
structure.volHeight = Math.abs(ymax-ymin)+1;
|
||||
structure.volWidth = Math.abs(zmax-zmin)+1;
|
||||
structure.volume = volume;
|
||||
structure.renderLocation = Object3D.get(tile).translate(0, 1, 0);
|
||||
structure.renderLocation = Coord4D.get(tile).translate(0, 1, 0);
|
||||
|
||||
for(Object3D obj : structure.locations)
|
||||
for(Coord4D obj : structure.locations)
|
||||
{
|
||||
if(obj.getTileEntity(pointer.worldObj) instanceof TileEntityDynamicValve)
|
||||
{
|
||||
|
@ -198,7 +198,7 @@ public class TankUpdateProtocol
|
|||
}
|
||||
}
|
||||
|
||||
if(structure.locations.contains(Object3D.get(pointer)) && isCorrectCorner(Object3D.get(tile), origX+xmin, origY+ymin, origZ+zmin))
|
||||
if(structure.locations.contains(Coord4D.get(pointer)) && isCorrectCorner(Coord4D.get(tile), origX+xmin, origY+ymin, origZ+zmin))
|
||||
{
|
||||
structureFound = structure;
|
||||
return;
|
||||
|
@ -210,7 +210,7 @@ public class TankUpdateProtocol
|
|||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tileEntity = Object3D.get(tile).getFromSide(side).getTileEntity(tile.worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(tile).getFromSide(side).getTileEntity(tile.worldObj);
|
||||
|
||||
if(tileEntity instanceof TileEntityDynamicTank)
|
||||
{
|
||||
|
@ -222,7 +222,7 @@ public class TankUpdateProtocol
|
|||
}
|
||||
}
|
||||
|
||||
public ForgeDirection getSide(Object3D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax)
|
||||
public ForgeDirection getSide(Coord4D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax)
|
||||
{
|
||||
if(obj.xCoord == xmin)
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ public class TankUpdateProtocol
|
|||
* @param zmin - minimum z value
|
||||
* @return
|
||||
*/
|
||||
private boolean isCorrectCorner(Object3D obj, int xmin, int ymin, int zmin)
|
||||
private boolean isCorrectCorner(Coord4D obj, int xmin, int ymin, int zmin)
|
||||
{
|
||||
if(obj.xCoord == xmin && obj.yCoord == ymin && obj.zCoord == zmin)
|
||||
{
|
||||
|
@ -311,7 +311,7 @@ public class TankUpdateProtocol
|
|||
* @param zmax - maximum z value
|
||||
* @return
|
||||
*/
|
||||
private boolean isFrame(Object3D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax)
|
||||
private boolean isFrame(Coord4D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax)
|
||||
{
|
||||
if(obj.xCoord == xmin && obj.yCoord == ymin)
|
||||
return true;
|
||||
|
@ -366,7 +366,7 @@ public class TankUpdateProtocol
|
|||
{
|
||||
for(TileEntityDynamicTank tileEntity : iteratedNodes)
|
||||
{
|
||||
if(!structureFound.locations.contains(Object3D.get(tileEntity)))
|
||||
if(!structureFound.locations.contains(Coord4D.get(tileEntity)))
|
||||
{
|
||||
for(TileEntity tile : iteratedNodes)
|
||||
{
|
||||
|
@ -379,7 +379,7 @@ public class TankUpdateProtocol
|
|||
|
||||
int idFound = -1;
|
||||
|
||||
for(Object3D obj : structureFound.locations)
|
||||
for(Coord4D obj : structureFound.locations)
|
||||
{
|
||||
TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)obj.getTileEntity(pointer.worldObj);
|
||||
|
||||
|
@ -411,7 +411,7 @@ public class TankUpdateProtocol
|
|||
structureFound.fluidStored.amount = Math.min(structureFound.fluidStored.amount, structureFound.volume*FLUID_PER_TANK);
|
||||
}
|
||||
|
||||
for(Object3D obj : structureFound.locations)
|
||||
for(Coord4D obj : structureFound.locations)
|
||||
{
|
||||
TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)obj.getTileEntity(pointer.worldObj);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.tileentity.TileEntityContainerBlock;
|
||||
import mekanism.common.transporter.TransporterManager;
|
||||
import mekanism.common.util.InventoryUtils;
|
||||
|
@ -109,7 +109,7 @@ public class TileComponentEjector implements ITileComponent, IEjector
|
|||
|
||||
for(ForgeDirection side : outputs)
|
||||
{
|
||||
TileEntity tile = Object3D.get(tileEntity).getFromSide(side).getTileEntity(tileEntity.worldObj);
|
||||
TileEntity tile = Coord4D.get(tileEntity).getFromSide(side).getTileEntity(tileEntity.worldObj);
|
||||
ItemStack prev = stack.copy();
|
||||
|
||||
if(tile instanceof IInventory && !(tile instanceof ILogisticalTransporter))
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.ClientProxy;
|
||||
import mekanism.common.ConnectedTextureRenderer;
|
||||
import mekanism.common.IActiveState;
|
||||
|
@ -326,7 +326,7 @@ public class BlockBasic extends Block
|
|||
|
||||
if(!manageInventory(entityplayer, tileEntity))
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||
entityplayer.openGui(Mekanism.instance, 18, world, x, y, z);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.block;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.client.ClientProxy;
|
||||
import mekanism.common.IActiveState;
|
||||
|
@ -193,7 +193,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
{
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tile = Object3D.get(transporter).getFromSide(dir).getTileEntity(world);
|
||||
TileEntity tile = Coord4D.get(transporter).getFromSide(dir).getTileEntity(world);
|
||||
|
||||
if(tile instanceof IInventory)
|
||||
{
|
||||
|
@ -613,7 +613,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
{
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tile = Object3D.get(tileEntity).getFromSide(dir).getTileEntity(world);
|
||||
TileEntity tile = Coord4D.get(tileEntity).getFromSide(dir).getTileEntity(world);
|
||||
|
||||
if(tileEntity instanceof IInventory)
|
||||
{
|
||||
|
@ -645,10 +645,10 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
}
|
||||
else if(!electricChest.authenticated)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketElectricChest().setParams(ElectricChestPacketType.CLIENT_OPEN, 2, 0, true, Object3D.get(electricChest)), entityplayer);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketElectricChest().setParams(ElectricChestPacketType.CLIENT_OPEN, 2, 0, true, Coord4D.get(electricChest)), entityplayer);
|
||||
}
|
||||
else {
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketElectricChest().setParams(ElectricChestPacketType.CLIENT_OPEN, 1, 0, true, Object3D.get(electricChest)), entityplayer);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketElectricChest().setParams(ElectricChestPacketType.CLIENT_OPEN, 1, 0, true, Coord4D.get(electricChest)), entityplayer);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -657,7 +657,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
else if(metadata == MachineType.LOGISTICAL_SORTER.meta)
|
||||
{
|
||||
TileEntityLogisticalSorter sorter = (TileEntityLogisticalSorter)tileEntity;
|
||||
PacketLogisticalSorterGui.openServerGui(SorterGuiPacket.SERVER, 0, world, (EntityPlayerMP)entityplayer, Object3D.get(tileEntity), -1);
|
||||
PacketLogisticalSorterGui.openServerGui(SorterGuiPacket.SERVER, 0, world, (EntityPlayerMP)entityplayer, Coord4D.get(tileEntity), -1);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
@ -759,7 +759,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
{
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tile = Object3D.get(tileEntity).getFromSide(dir).getTileEntity(world);
|
||||
TileEntity tile = Coord4D.get(tileEntity).getFromSide(dir).getTileEntity(world);
|
||||
|
||||
if(tile instanceof IInventory)
|
||||
{
|
||||
|
|
|
@ -2,9 +2,10 @@ package mekanism.common.item;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.common.EntityBalloon;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -66,14 +67,37 @@ public class ItemBalloon extends ItemMekanism
|
|||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
if(player.isSneaking())
|
||||
{
|
||||
world.spawnEntityInWorld(new EntityBalloon(world, new Object3D(x, y, z), getColor(stack)));
|
||||
Coord4D obj = new Coord4D(x, y, z);
|
||||
|
||||
if(Block.blocksList[obj.getBlockId(world)].isBlockReplaceable(world, x, y, z))
|
||||
{
|
||||
obj.yCoord--;
|
||||
}
|
||||
|
||||
if(canReplace(world, obj.xCoord, obj.yCoord+1, obj.zCoord) && canReplace(world, obj.xCoord, obj.yCoord+2, obj.zCoord))
|
||||
{
|
||||
world.setBlockToAir(obj.xCoord, obj.yCoord+1, obj.zCoord);
|
||||
world.setBlockToAir(obj.xCoord, obj.yCoord+2, obj.zCoord);
|
||||
|
||||
if(!world.isRemote)
|
||||
{
|
||||
world.spawnEntityInWorld(new EntityBalloon(world, obj, getColor(stack)));
|
||||
}
|
||||
|
||||
stack.stackSize--;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
stack.stackSize--;
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean canReplace(World world, int x, int y, int z)
|
||||
{
|
||||
return world.isAirBlock(x, y, z) || Block.blocksList[world.getBlockId(x, y, z)].isBlockReplaceable(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.common.IEnergyCube;
|
||||
import mekanism.common.ISustainedInventory;
|
||||
|
@ -98,7 +98,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, II
|
|||
|
||||
if(!world.isRemote)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.EntityBalloon;
|
||||
import mekanism.common.IConfigurable;
|
||||
import mekanism.common.IInvConfiguration;
|
||||
|
@ -48,7 +48,7 @@ public class ItemConfigurator extends ItemEnergized implements IToolWrench
|
|||
{
|
||||
if(hasLink(itemstack))
|
||||
{
|
||||
Object3D obj = getLink(itemstack);
|
||||
Coord4D obj = getLink(itemstack);
|
||||
|
||||
list.add(EnumColor.GREY + MekanismUtils.localize("tooltip.configurator.linkMsg") + " " + EnumColor.INDIGO + MekanismUtils.getCoordDisplay(obj) + EnumColor.GREY + ", " + MekanismUtils.localize("tooltip.configurator.dim") + " " + EnumColor.INDIGO + obj.dimensionId);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class ItemConfigurator extends ItemEnergized implements IToolWrench
|
|||
if(config instanceof TileEntityBasicBlock)
|
||||
{
|
||||
TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)config;
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), Object3D.get(tileEntity), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), Coord4D.get(tileEntity), 50D);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -198,7 +198,7 @@ public class ItemConfigurator extends ItemEnergized implements IToolWrench
|
|||
{
|
||||
if(!world.isRemote && player.isSneaking())
|
||||
{
|
||||
Object3D obj = new Object3D(x, y, z, world.provider.dimensionId);
|
||||
Coord4D obj = new Coord4D(x, y, z, world.provider.dimensionId);
|
||||
player.addChatMessage(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " Set link to block " + EnumColor.INDIGO + MekanismUtils.getCoordDisplay(obj) + EnumColor.GREY + ", dimension " + EnumColor.INDIGO + obj.dimensionId);
|
||||
setLink(stack, obj);
|
||||
|
||||
|
@ -276,17 +276,17 @@ public class ItemConfigurator extends ItemEnergized implements IToolWrench
|
|||
return getLink(itemStack) != null;
|
||||
}
|
||||
|
||||
public Object3D getLink(ItemStack itemStack)
|
||||
public Coord4D getLink(ItemStack itemStack)
|
||||
{
|
||||
if(itemStack.stackTagCompound == null || !itemStack.getTagCompound().hasKey("position"))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object3D.read(itemStack.getTagCompound().getCompoundTag("position"));
|
||||
return Coord4D.read(itemStack.getTagCompound().getCompoundTag("position"));
|
||||
}
|
||||
|
||||
public void setLink(ItemStack itemStack, Object3D obj)
|
||||
public void setLink(ItemStack itemStack, Coord4D obj)
|
||||
{
|
||||
if(itemStack.getTagCompound() == null)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package mekanism.common.item;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -24,7 +24,7 @@ public class ItemPortableTeleporter extends ItemEnergized
|
|||
return itemstack;
|
||||
}
|
||||
|
||||
public int calculateEnergyCost(Entity entity, Object3D coords)
|
||||
public int calculateEnergyCost(Entity entity, Coord4D coords)
|
||||
{
|
||||
if(coords == null)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.item;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.EntityRobit;
|
||||
import mekanism.common.ISustainedInventory;
|
||||
import mekanism.common.tileentity.TileEntityChargepad;
|
||||
|
@ -52,7 +52,7 @@ public class ItemRobit extends ItemEnergized implements ISustainedInventory
|
|||
{
|
||||
EntityRobit robit = new EntityRobit(world, x+0.5, y+0.1, z+0.5);
|
||||
|
||||
robit.setHome(Object3D.get(chargepad));
|
||||
robit.setHome(Coord4D.get(chargepad));
|
||||
robit.setEnergy(getEnergy(itemstack));
|
||||
robit.setOwner(entityplayer.username);
|
||||
robit.setInventory(getInventory(itemstack));
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.miner;
|
|||
|
||||
import java.util.Collections;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IBoundingBlock;
|
||||
import mekanism.common.tileentity.TileEntityDigitalMiner;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
@ -41,12 +41,12 @@ public class ThreadMinerSearch extends Thread
|
|||
return;
|
||||
}
|
||||
|
||||
if(Object3D.get(tileEntity).equals(new Object3D(x, y, z, tileEntity.worldObj.provider.dimensionId)))
|
||||
if(Coord4D.get(tileEntity).equals(new Coord4D(x, y, z, tileEntity.worldObj.provider.dimensionId)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(new Object3D(x, y, z).getTileEntity(tileEntity.worldObj) instanceof IBoundingBlock)
|
||||
if(new Coord4D(x, y, z).getTileEntity(tileEntity.worldObj) instanceof IBoundingBlock)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ public class ThreadMinerSearch extends Thread
|
|||
{
|
||||
if(filter.canFilter(stack))
|
||||
{
|
||||
tileEntity.oresToMine.add(new Object3D(x, y, z));
|
||||
tileEntity.oresToMine.add(new Coord4D(x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
import mekanism.api.transmitters.ITransmitterNetwork;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
|
@ -46,7 +46,7 @@ public class ItemPartTransmitter extends JItemMultiPart
|
|||
|
||||
if(TransmissionType.values()[stack.getItemDamage()] != TransmissionType.ITEM)
|
||||
{
|
||||
Object3D obj = new Object3D(coord.x, coord.y, coord.z);
|
||||
Coord4D obj = new Coord4D(coord.x, coord.y, coord.z);
|
||||
|
||||
List<ITransmitterNetwork<?, ?>> networks = new ArrayList<ITransmitterNetwork<?, ?>>();
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.IBlockableConnection;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.client.render.RenderPartTransmitter;
|
||||
|
@ -146,7 +146,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
{
|
||||
if(canConnectMutual(side))
|
||||
{
|
||||
TileEntity tileEntity = Object3D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
TileEntity tileEntity = Coord4D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
|
||||
if(TransmissionType.checkTransmissionType(tileEntity, getTransmissionType()) && isConnectable(tileEntity))
|
||||
{
|
||||
|
@ -176,7 +176,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
{
|
||||
if(canConnectMutual(side))
|
||||
{
|
||||
TileEntity tileEntity = Object3D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
TileEntity tileEntity = Coord4D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
|
||||
if(isValidAcceptor(tileEntity, side))
|
||||
{
|
||||
|
@ -294,7 +294,7 @@ public abstract class PartSidedPipe extends TMultiPart implements TSlottedPart,
|
|||
{
|
||||
if(!canConnect(side)) return false;
|
||||
|
||||
TileEntity tile = Object3D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
TileEntity tile = Coord4D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
return (!(tile instanceof IBlockableConnection) || ((IBlockableConnection)tile).canConnect(side.getOpposite()));
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
|
||||
import codechicken.multipart.*;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.DynamicNetwork;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
|
@ -93,7 +93,7 @@ public abstract class PartTransmitter<N extends DynamicNetwork<?, N>> extends Pa
|
|||
{
|
||||
if(connectionMapContainsSide(possibleTransmitters, side))
|
||||
{
|
||||
TileEntity tileEntity = Object3D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
TileEntity tileEntity = Coord4D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
|
||||
if(TransmissionType.checkTransmissionType(tileEntity, getTransmissionType()) && isConnectable(tileEntity))
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ public abstract class PartTransmitter<N extends DynamicNetwork<?, N>> extends Pa
|
|||
{
|
||||
if(connectionMapContainsSide(possibleTransmitters, side))
|
||||
{
|
||||
TileEntity cable = Object3D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
TileEntity cable = Coord4D.get(tile()).getFromSide(side).getTileEntity(world());
|
||||
|
||||
if(TransmissionType.checkTransmissionType(cable, getTransmissionType()) && ((ITransmitter<N>)cable).getTransmitterNetwork(false) != null)
|
||||
{
|
||||
|
@ -296,7 +296,7 @@ public abstract class PartTransmitter<N extends DynamicNetwork<?, N>> extends Pa
|
|||
@Override
|
||||
public boolean canConnectToAcceptor(ForgeDirection side)
|
||||
{
|
||||
if(!isValidAcceptor(Object3D.get(tile()).getFromSide(side).getTileEntity(world()), side))
|
||||
if(!isValidAcceptor(Coord4D.get(tile()).getFromSide(side).getTileEntity(world()), side))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import ic2.api.energy.tile.IEnergyTile;
|
|||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.client.render.PartTransmitterIcons;
|
||||
|
@ -150,9 +150,9 @@ public class PartUniversalCable extends PartTransmitter<EnergyNetwork> implement
|
|||
{
|
||||
if(!world().isRemote)
|
||||
{
|
||||
if(!Mekanism.ic2Registered.contains(Object3D.get(tile())))
|
||||
if(!Mekanism.ic2Registered.contains(Coord4D.get(tile())))
|
||||
{
|
||||
Mekanism.ic2Registered.add(Object3D.get(tile()));
|
||||
Mekanism.ic2Registered.add(Coord4D.get(tile()));
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent((IEnergyTile)tile()));
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ public class PartUniversalCable extends PartTransmitter<EnergyNetwork> implement
|
|||
{
|
||||
if(!world().isRemote)
|
||||
{
|
||||
Mekanism.ic2Registered.remove(Object3D.get(tile()));
|
||||
Mekanism.ic2Registered.remove(Coord4D.get(tile()));
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent((IEnergyTile)tile()));
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ public class PartUniversalCable extends PartTransmitter<EnergyNetwork> implement
|
|||
{
|
||||
if(!world().isRemote)
|
||||
{
|
||||
Mekanism.ic2Registered.remove(Object3D.get(tile()));
|
||||
Mekanism.ic2Registered.remove(Coord4D.get(tile()));
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent((IEnergyTile)tile()));
|
||||
|
||||
getTransmitterNetwork().electricityStored -= lastWrite;
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.network;
|
|||
import java.io.DataOutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IInvConfiguration;
|
||||
import mekanism.common.ITileNetwork;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -20,7 +20,7 @@ import com.google.common.io.ByteArrayDataInput;
|
|||
|
||||
public class PacketConfigurationUpdate implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
public int configIndex;
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class PacketConfigurationUpdate implements IMekanismPacket
|
|||
{
|
||||
packetType = (ConfigurationPacket)data[0];
|
||||
|
||||
object3D = (Object3D)data[1];
|
||||
object3D = (Coord4D)data[1];
|
||||
|
||||
if(packetType == ConfigurationPacket.EJECT_COLOR)
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ public class PacketConfigurationUpdate implements IMekanismPacket
|
|||
{
|
||||
packetType = ConfigurationPacket.values()[dataStream.readInt()];
|
||||
|
||||
object3D = new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
object3D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
|
||||
TileEntity tile = object3D.getTileEntity(world);
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.network;
|
|||
import java.io.DataOutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.DynamicNetwork;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
import mekanism.common.ITileNetwork;
|
||||
|
@ -21,7 +21,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
|||
|
||||
public class PacketDataRequest implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
|
@ -32,7 +32,7 @@ public class PacketDataRequest implements IMekanismPacket
|
|||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
object3D = (Object3D)data[0];
|
||||
object3D = (Coord4D)data[0];
|
||||
|
||||
return this;
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class PacketDataRequest implements IMekanismPacket
|
|||
}
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(worldServer.getBlockTileEntity(x, y, z)), ((ITileNetwork)worldServer.getBlockTileEntity(x, y, z)).getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(worldServer.getBlockTileEntity(x, y, z)), ((ITileNetwork)worldServer.getBlockTileEntity(x, y, z)).getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.network;
|
|||
import java.io.DataOutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.gui.GuiDigitalMiner;
|
||||
import mekanism.client.gui.GuiDigitalMinerConfig;
|
||||
import mekanism.client.gui.GuiMItemStackFilter;
|
||||
|
@ -29,7 +29,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class PacketDigitalMinerGui implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
public MinerGuiPacket packetType;
|
||||
|
||||
|
@ -50,7 +50,7 @@ public class PacketDigitalMinerGui implements IMekanismPacket
|
|||
{
|
||||
packetType = (MinerGuiPacket)data[0];
|
||||
|
||||
object3D = (Object3D)data[1];
|
||||
object3D = (Coord4D)data[1];
|
||||
type = (Integer)data[2];
|
||||
|
||||
if(packetType == MinerGuiPacket.CLIENT)
|
||||
|
@ -75,7 +75,7 @@ public class PacketDigitalMinerGui implements IMekanismPacket
|
|||
{
|
||||
packetType = MinerGuiPacket.values()[dataStream.readInt()];
|
||||
|
||||
object3D = new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
object3D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
|
||||
type = dataStream.readInt();
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class PacketDigitalMinerGui implements IMekanismPacket
|
|||
}
|
||||
}
|
||||
|
||||
public static void openServerGui(MinerGuiPacket t, int guiType, World world, EntityPlayerMP playerMP, Object3D obj, int i)
|
||||
public static void openServerGui(MinerGuiPacket t, int guiType, World world, EntityPlayerMP playerMP, Coord4D obj, int i)
|
||||
{
|
||||
Container container = null;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.network;
|
|||
import java.io.DataOutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.miner.MinerFilter;
|
||||
|
@ -19,7 +19,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
|||
|
||||
public class PacketEditFilter implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
public TransporterFilter tFilter;
|
||||
public TransporterFilter tEdited;
|
||||
|
@ -40,7 +40,7 @@ public class PacketEditFilter implements IMekanismPacket
|
|||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
object3D = (Object3D)data[0];
|
||||
object3D = (Coord4D)data[0];
|
||||
delete = (Boolean)data[1];
|
||||
|
||||
if(data[2] instanceof TransporterFilter)
|
||||
|
@ -72,7 +72,7 @@ public class PacketEditFilter implements IMekanismPacket
|
|||
@Override
|
||||
public void read(ByteArrayDataInput dataStream, EntityPlayer player, World world) throws Exception
|
||||
{
|
||||
object3D = new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
object3D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
|
||||
type = dataStream.readByte();
|
||||
delete = dataStream.readBoolean();
|
||||
|
@ -120,7 +120,7 @@ public class PacketEditFilter implements IMekanismPacket
|
|||
|
||||
for(EntityPlayer iterPlayer : sorter.playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(sorter), sorter.getFilterPacket(new ArrayList())), iterPlayer);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(sorter), sorter.getFilterPacket(new ArrayList())), iterPlayer);
|
||||
}
|
||||
}
|
||||
else if(type == 1 && object3D.getTileEntity(worldServer) instanceof TileEntityDigitalMiner)
|
||||
|
@ -143,7 +143,7 @@ public class PacketEditFilter implements IMekanismPacket
|
|||
|
||||
for(EntityPlayer iterPlayer : miner.playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(miner), miner.getFilterPacket(new ArrayList())), iterPlayer);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(miner), miner.getFilterPacket(new ArrayList())), iterPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.network;
|
|||
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.common.IElectricChest;
|
||||
import mekanism.common.Mekanism;
|
||||
|
@ -32,7 +32,7 @@ public class PacketElectricChest implements IMekanismPacket
|
|||
|
||||
public boolean useEnergy;
|
||||
|
||||
public Object3D obj;
|
||||
public Coord4D obj;
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
|
@ -53,7 +53,7 @@ public class PacketElectricChest implements IMekanismPacket
|
|||
|
||||
if(isBlock)
|
||||
{
|
||||
obj = (Object3D)data[3];
|
||||
obj = (Coord4D)data[3];
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -63,7 +63,7 @@ public class PacketElectricChest implements IMekanismPacket
|
|||
|
||||
if(isBlock)
|
||||
{
|
||||
obj = (Object3D)data[3];
|
||||
obj = (Coord4D)data[3];
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -74,7 +74,7 @@ public class PacketElectricChest implements IMekanismPacket
|
|||
|
||||
if(isBlock)
|
||||
{
|
||||
obj = (Object3D)data[4];
|
||||
obj = (Coord4D)data[4];
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -84,7 +84,7 @@ public class PacketElectricChest implements IMekanismPacket
|
|||
|
||||
if(isBlock)
|
||||
{
|
||||
obj = (Object3D)data[3];
|
||||
obj = (Coord4D)data[3];
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.network;
|
|||
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.gui.GuiTItemStackFilter;
|
||||
import mekanism.client.gui.GuiLogisticalSorter;
|
||||
import mekanism.client.gui.GuiTOreDictFilter;
|
||||
|
@ -27,7 +27,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class PacketLogisticalSorterGui implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
public SorterGuiPacket packetType;
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class PacketLogisticalSorterGui implements IMekanismPacket
|
|||
{
|
||||
packetType = (SorterGuiPacket)data[0];
|
||||
|
||||
object3D = (Object3D)data[1];
|
||||
object3D = (Coord4D)data[1];
|
||||
type = (Integer)data[2];
|
||||
|
||||
if(packetType == SorterGuiPacket.CLIENT)
|
||||
|
@ -73,7 +73,7 @@ public class PacketLogisticalSorterGui implements IMekanismPacket
|
|||
{
|
||||
packetType = SorterGuiPacket.values()[dataStream.readInt()];
|
||||
|
||||
object3D = new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
object3D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
|
||||
type = dataStream.readInt();
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class PacketLogisticalSorterGui implements IMekanismPacket
|
|||
}
|
||||
}
|
||||
|
||||
public static void openServerGui(SorterGuiPacket t, int guiType, World world, EntityPlayerMP playerMP, Object3D obj, int i)
|
||||
public static void openServerGui(SorterGuiPacket t, int guiType, World world, EntityPlayerMP playerMP, Coord4D obj, int i)
|
||||
{
|
||||
Container container = null;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.network;
|
|||
import java.io.DataOutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.miner.MinerFilter;
|
||||
|
@ -19,7 +19,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
|
|||
|
||||
public class PacketNewFilter implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
public TransporterFilter tFilter;
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class PacketNewFilter implements IMekanismPacket
|
|||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
object3D = (Object3D)data[0];
|
||||
object3D = (Coord4D)data[0];
|
||||
|
||||
if(data[1] instanceof TransporterFilter)
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ public class PacketNewFilter implements IMekanismPacket
|
|||
@Override
|
||||
public void read(ByteArrayDataInput dataStream, EntityPlayer player, World world) throws Exception
|
||||
{
|
||||
object3D = new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
object3D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
type = dataStream.readByte();
|
||||
|
||||
World worldServer = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(object3D.dimensionId);
|
||||
|
@ -71,7 +71,7 @@ public class PacketNewFilter implements IMekanismPacket
|
|||
|
||||
for(EntityPlayer iterPlayer : sorter.playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(sorter), sorter.getFilterPacket(new ArrayList())), iterPlayer);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(sorter), sorter.getFilterPacket(new ArrayList())), iterPlayer);
|
||||
}
|
||||
}
|
||||
else if(type == 1 && object3D.getTileEntity(worldServer) instanceof TileEntityDigitalMiner)
|
||||
|
@ -83,7 +83,7 @@ public class PacketNewFilter implements IMekanismPacket
|
|||
|
||||
for(EntityPlayer iterPlayer : miner.playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(miner), miner.getFilterPacket(new ArrayList())), iterPlayer);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(miner), miner.getFilterPacket(new ArrayList())), iterPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.network;
|
|||
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.Teleporter;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -43,7 +43,7 @@ public class PacketPortableTeleport implements IMekanismPacket
|
|||
|
||||
if(item.getStatus(itemstack) == 1)
|
||||
{
|
||||
Object3D coords = MekanismUtils.getClosestCoords(new Teleporter.Code(item.getDigit(itemstack, 0), item.getDigit(itemstack, 1), item.getDigit(itemstack, 2), item.getDigit(itemstack, 3)), player);
|
||||
Coord4D coords = MekanismUtils.getClosestCoords(new Teleporter.Code(item.getDigit(itemstack, 0), item.getDigit(itemstack, 1), item.getDigit(itemstack, 2), item.getDigit(itemstack, 3)), player);
|
||||
|
||||
item.setEnergy(itemstack, item.getEnergy(itemstack) - item.calculateEnergyCost(player, coords));
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.network;
|
|||
import java.io.DataOutputStream;
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -11,7 +11,7 @@ import com.google.common.io.ByteArrayDataInput;
|
|||
|
||||
public class PacketPortalFX implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
|
@ -22,7 +22,7 @@ public class PacketPortalFX implements IMekanismPacket
|
|||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
object3D = (Object3D)data[0];
|
||||
object3D = (Coord4D)data[0];
|
||||
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.network;
|
|||
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IRedstoneControl;
|
||||
import mekanism.common.IRedstoneControl.RedstoneControl;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -13,7 +13,7 @@ import com.google.common.io.ByteArrayDataInput;
|
|||
|
||||
public class PacketRedstoneControl implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
public RedstoneControl value;
|
||||
|
||||
@Override
|
||||
|
@ -25,7 +25,7 @@ public class PacketRedstoneControl implements IMekanismPacket
|
|||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
object3D = (Object3D)data[0];
|
||||
object3D = (Coord4D)data[0];
|
||||
value = (RedstoneControl)data[1];
|
||||
|
||||
return this;
|
||||
|
@ -34,7 +34,7 @@ public class PacketRedstoneControl implements IMekanismPacket
|
|||
@Override
|
||||
public void read(ByteArrayDataInput dataStream, EntityPlayer player, World world) throws Exception
|
||||
{
|
||||
Object3D obj = new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
Coord4D obj = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
RedstoneControl control = RedstoneControl.values()[dataStream.readInt()];
|
||||
|
||||
TileEntity tileEntity = obj.getTileEntity(world);
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.network;
|
|||
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IUpgradeManagement;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.tileentity.TileEntityBasicBlock;
|
||||
|
@ -15,7 +15,7 @@ import com.google.common.io.ByteArrayDataInput;
|
|||
|
||||
public class PacketRemoveUpgrade implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
public byte upgradeType;
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class PacketRemoveUpgrade implements IMekanismPacket
|
|||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
object3D = (Object3D)data[0];
|
||||
object3D = (Coord4D)data[0];
|
||||
upgradeType = (Byte)data[1];
|
||||
|
||||
return this;
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.network;
|
|||
|
||||
import java.io.DataOutputStream;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -20,7 +20,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class PacketSimpleGui implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
public int guiId;
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class PacketSimpleGui implements IMekanismPacket
|
|||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
object3D = (Object3D)data[0];
|
||||
object3D = (Coord4D)data[0];
|
||||
guiId = (Integer)data[1];
|
||||
|
||||
return this;
|
||||
|
@ -42,7 +42,7 @@ public class PacketSimpleGui implements IMekanismPacket
|
|||
@Override
|
||||
public void read(ByteArrayDataInput dataStream, EntityPlayer player, World world) throws Exception
|
||||
{
|
||||
object3D = new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
object3D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
|
||||
guiId = dataStream.readInt();
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class PacketSimpleGui implements IMekanismPacket
|
|||
}
|
||||
}
|
||||
|
||||
public static void openServerGui(int id, EntityPlayerMP playerMP, World world, Object3D obj)
|
||||
public static void openServerGui(int id, EntityPlayerMP playerMP, World world, Coord4D obj)
|
||||
{
|
||||
playerMP.closeContainer();
|
||||
playerMP.incrementWindowID();
|
||||
|
@ -80,7 +80,7 @@ public class PacketSimpleGui implements IMekanismPacket
|
|||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen getGui(int id, EntityPlayer player, World world, Object3D obj)
|
||||
public GuiScreen getGui(int id, EntityPlayer player, World world, Coord4D obj)
|
||||
{
|
||||
return (GuiScreen)Mekanism.proxy.getClientGui(id, player, world, obj.xCoord, obj.yCoord, obj.zCoord);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.network;
|
|||
import java.io.DataOutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.ITileNetwork;
|
||||
import mekanism.common.PacketHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -14,7 +14,7 @@ import com.google.common.io.ByteArrayDataInput;
|
|||
|
||||
public class PacketTileEntity implements IMekanismPacket
|
||||
{
|
||||
public Object3D object3D;
|
||||
public Coord4D object3D;
|
||||
|
||||
public ArrayList parameters;
|
||||
|
||||
|
@ -27,7 +27,7 @@ public class PacketTileEntity implements IMekanismPacket
|
|||
@Override
|
||||
public IMekanismPacket setParams(Object... data)
|
||||
{
|
||||
object3D = (Object3D)data[0];
|
||||
object3D = (Coord4D)data[0];
|
||||
parameters = (ArrayList)data[1];
|
||||
|
||||
return this;
|
||||
|
|
|
@ -10,7 +10,7 @@ import buildcraft.api.power.PowerHandler.PowerReceiver;
|
|||
import cofh.api.energy.IEnergyHandler;
|
||||
import ic2.api.energy.tile.IEnergySink;
|
||||
import ic2.api.energy.tile.IEnergyTile;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.IStrictEnergyAcceptor;
|
||||
import mekanism.api.energy.IStrictEnergyStorage;
|
||||
import mekanism.common.IAdvancedBoundingBlock;
|
||||
|
@ -153,7 +153,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
return false;
|
||||
}
|
||||
|
||||
return getInv().canBoundInsert(Object3D.get(this), i, itemstack);
|
||||
return getInv().canBoundInsert(Coord4D.get(this), i, itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -164,7 +164,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
return InventoryUtils.EMPTY;
|
||||
}
|
||||
|
||||
return getInv().getBoundSlots(Object3D.get(this), slotID);
|
||||
return getInv().getBoundSlots(Coord4D.get(this), slotID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -181,7 +181,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
return false;
|
||||
}
|
||||
|
||||
return getInv().canBoundExtract(Object3D.get(this), i, itemstack, j);
|
||||
return getInv().canBoundExtract(Coord4D.get(this), i, itemstack, j);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -472,6 +472,6 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
|||
|
||||
public IAdvancedBoundingBlock getInv()
|
||||
{
|
||||
return (IAdvancedBoundingBlock)new Object3D(mainX, mainY, mainZ).getTileEntity(worldObj);
|
||||
return (IAdvancedBoundingBlock)new Coord4D(mainX, mainY, mainZ).getTileEntity(worldObj);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.ITileComponent;
|
||||
import mekanism.common.ITileNetwork;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -55,7 +55,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
|
|||
{
|
||||
for(EntityPlayer player : playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), player);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
|
|||
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Object3D.get(this)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
|
|||
|
||||
if(facing != clientFacing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlockId(xCoord, yCoord, zCoord));
|
||||
clientFacing = facing;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.tileentity;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.sound.IHasSound;
|
||||
import mekanism.common.IActiveState;
|
||||
import mekanism.common.IInvConfiguration;
|
||||
|
@ -115,7 +115,7 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.tileentity;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IActiveState;
|
||||
import mekanism.common.IConfigurable;
|
||||
import mekanism.common.ILogisticalTransporter;
|
||||
|
@ -190,7 +190,7 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
|||
|
||||
if(bottomStack != null && isActive && delayTicks == 0)
|
||||
{
|
||||
TileEntity tile = Object3D.get(this).getFromSide(ForgeDirection.getOrientation(0)).getTileEntity(worldObj);
|
||||
TileEntity tile = Coord4D.get(this).getFromSide(ForgeDirection.getOrientation(0)).getTileEntity(worldObj);
|
||||
|
||||
if(tile instanceof ILogisticalTransporter)
|
||||
{
|
||||
|
@ -372,7 +372,7 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
|||
if(!worldObj.isRemote)
|
||||
{
|
||||
MekanismUtils.saveChunk(this);
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
prevCount = getItemCount();
|
||||
sortStacks();
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
|||
|
||||
if(clientActive != active)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
clientActive = active;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.ITileNetwork;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -27,7 +27,7 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
|||
mainY = y;
|
||||
mainZ = z;
|
||||
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
|||
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Object3D.get(this)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.EnumSet;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.EnergizedItemManager;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.client.sound.IHasSound;
|
||||
|
@ -182,7 +182,7 @@ public class TileEntityChargepad extends TileEntityElectricBlock implements IAct
|
|||
|
||||
if(prevActive != active)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
|
||||
prevActive = active;
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.tileentity;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.GasTank;
|
||||
|
@ -83,7 +83,7 @@ public class TileEntityChemicalFormulator extends TileEntityElectricBlock implem
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ public class TileEntityChemicalFormulator extends TileEntityElectricBlock implem
|
|||
GasStack toSend = new GasStack(gasTank.getGas().getGas(), Math.min(gasTank.getStored(), gasOutput));
|
||||
gasTank.draw(GasTransmission.emitGasToNetwork(toSend, this, MekanismUtils.getRight(facing)), true);
|
||||
|
||||
TileEntity tileEntity = Object3D.get(this).getFromSide(MekanismUtils.getRight(facing)).getTileEntity(worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(this).getFromSide(MekanismUtils.getRight(facing)).getTileEntity(worldObj);
|
||||
|
||||
if(tileEntity instanceof IGasHandler)
|
||||
{
|
||||
|
@ -296,7 +296,7 @@ public class TileEntityChemicalFormulator extends TileEntityElectricBlock implem
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.tileentity;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.ChemicalInput;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
|
@ -85,7 +85,7 @@ public class TileEntityChemicalInfuser extends TileEntityElectricBlock implement
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ public class TileEntityChemicalInfuser extends TileEntityElectricBlock implement
|
|||
GasStack toSend = new GasStack(centerTank.getGas().getGas(), Math.min(centerTank.getStored(), gasOutput));
|
||||
centerTank.draw(GasTransmission.emitGasToNetwork(toSend, this, ForgeDirection.getOrientation(facing)), true);
|
||||
|
||||
TileEntity tileEntity = Object3D.get(this).getFromSide(ForgeDirection.getOrientation(facing)).getTileEntity(worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(this).getFromSide(ForgeDirection.getOrientation(facing)).getTileEntity(worldObj);
|
||||
|
||||
if(tileEntity instanceof IGasHandler)
|
||||
{
|
||||
|
@ -184,7 +184,7 @@ public class TileEntityChemicalInfuser extends TileEntityElectricBlock implement
|
|||
|
||||
for(EntityPlayer player : playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), player);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), player);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -336,7 +336,7 @@ public class TileEntityChemicalInfuser extends TileEntityElectricBlock implement
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.HashList;
|
||||
import mekanism.common.IActiveState;
|
||||
import mekanism.common.IAdvancedBoundingBlock;
|
||||
|
@ -55,7 +55,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
{
|
||||
public static int[] EJECT_INV;
|
||||
|
||||
public List<Object3D> oresToMine = new ArrayList<Object3D>();
|
||||
public List<Coord4D> oresToMine = new ArrayList<Coord4D>();
|
||||
|
||||
public HashList<MinerFilter> filters = new HashList<MinerFilter>();
|
||||
|
||||
|
@ -144,9 +144,9 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
|
||||
if(delay == 0)
|
||||
{
|
||||
Set<Object3D> toRemove = new HashSet<Object3D>();
|
||||
Set<Coord4D> toRemove = new HashSet<Coord4D>();
|
||||
|
||||
for(Object3D obj : oresToMine)
|
||||
for(Coord4D obj : oresToMine)
|
||||
{
|
||||
if(!obj.exists(worldObj))
|
||||
{
|
||||
|
@ -196,7 +196,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
}
|
||||
}
|
||||
|
||||
for(Object3D obj : toRemove)
|
||||
for(Coord4D obj : toRemove)
|
||||
{
|
||||
oresToMine.remove(obj);
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
{
|
||||
for(EntityPlayer player : playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(this), getSmallPacket(new ArrayList())), player);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(this), getSmallPacket(new ArrayList())), player);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -263,7 +263,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
return MekanismUtils.getTicks(getSpeedMultiplier(), 80);
|
||||
}
|
||||
|
||||
public void setReplace(Object3D obj)
|
||||
public void setReplace(Coord4D obj)
|
||||
{
|
||||
ItemStack stack = getReplace();
|
||||
|
||||
|
@ -398,14 +398,14 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
|
||||
public TileEntity getPullInv()
|
||||
{
|
||||
return new Object3D(xCoord, yCoord+2, zCoord).getTileEntity(worldObj);
|
||||
return new Coord4D(xCoord, yCoord+2, zCoord).getTileEntity(worldObj);
|
||||
}
|
||||
|
||||
public TileEntity getEjectInv()
|
||||
{
|
||||
ForgeDirection side = ForgeDirection.getOrientation(facing).getOpposite();
|
||||
|
||||
return new Object3D(xCoord+(side.offsetX*2), yCoord+1, zCoord+(side.offsetZ*2), worldObj.provider.dimensionId).getTileEntity(worldObj);
|
||||
return new Coord4D(xCoord+(side.offsetX*2), yCoord+1, zCoord+(side.offsetZ*2), worldObj.provider.dimensionId).getTileEntity(worldObj);
|
||||
}
|
||||
|
||||
public void add(List<ItemStack> stacks)
|
||||
|
@ -483,7 +483,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
{
|
||||
for(EntityPlayer player : playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), player);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
|
||||
for(EntityPlayer player : playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(this), getGenericPacket(new ArrayList())), player);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(this), getGenericPacket(new ArrayList())), player);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -868,7 +868,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
|
||||
if(clientActive != active)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
clientActive = active;
|
||||
}
|
||||
|
@ -913,7 +913,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
continue;
|
||||
}
|
||||
|
||||
MekanismUtils.makeAdvancedBoundingBlock(worldObj, x, y, z, Object3D.get(this));
|
||||
MekanismUtils.makeAdvancedBoundingBlock(worldObj, x, y, z, Coord4D.get(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -949,16 +949,16 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
public TileEntity getEjectTile()
|
||||
{
|
||||
ForgeDirection side = ForgeDirection.getOrientation(facing).getOpposite();
|
||||
return new Object3D(xCoord+side.offsetX, yCoord+1, zCoord+side.offsetZ, worldObj.provider.dimensionId).getTileEntity(worldObj);
|
||||
return new Coord4D(xCoord+side.offsetX, yCoord+1, zCoord+side.offsetZ, worldObj.provider.dimensionId).getTileEntity(worldObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getBoundSlots(Object3D location, int side)
|
||||
public int[] getBoundSlots(Coord4D location, int side)
|
||||
{
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(facing).getOpposite();
|
||||
|
||||
Object3D eject = new Object3D(xCoord+dir.offsetX, yCoord+1, zCoord+dir.offsetZ, worldObj.provider.dimensionId);
|
||||
Object3D pull = new Object3D(xCoord, yCoord+1, zCoord);
|
||||
Coord4D eject = new Coord4D(xCoord+dir.offsetX, yCoord+1, zCoord+dir.offsetZ, worldObj.provider.dimensionId);
|
||||
Coord4D pull = new Coord4D(xCoord, yCoord+1, zCoord);
|
||||
|
||||
if((location.equals(eject) && side == dir.ordinal()) || (location.equals(pull) && side == 1))
|
||||
{
|
||||
|
@ -979,12 +979,12 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canBoundInsert(Object3D location, int i, ItemStack itemstack)
|
||||
public boolean canBoundInsert(Coord4D location, int i, ItemStack itemstack)
|
||||
{
|
||||
ForgeDirection side = ForgeDirection.getOrientation(facing).getOpposite();
|
||||
|
||||
Object3D eject = new Object3D(xCoord+side.offsetX, yCoord+1, zCoord+side.offsetZ, worldObj.provider.dimensionId);
|
||||
Object3D pull = new Object3D(xCoord, yCoord+1, zCoord);
|
||||
Coord4D eject = new Coord4D(xCoord+side.offsetX, yCoord+1, zCoord+side.offsetZ, worldObj.provider.dimensionId);
|
||||
Coord4D pull = new Coord4D(xCoord, yCoord+1, zCoord);
|
||||
|
||||
if(location.equals(eject))
|
||||
{
|
||||
|
@ -1002,12 +1002,12 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canBoundExtract(Object3D location, int i, ItemStack itemstack, int j)
|
||||
public boolean canBoundExtract(Coord4D location, int i, ItemStack itemstack, int j)
|
||||
{
|
||||
ForgeDirection side = ForgeDirection.getOrientation(facing).getOpposite();
|
||||
|
||||
Object3D eject = new Object3D(xCoord+side.offsetX, yCoord+1, zCoord+side.offsetZ, worldObj.provider.dimensionId);
|
||||
Object3D pull = new Object3D(xCoord, yCoord+1, zCoord);
|
||||
Coord4D eject = new Coord4D(xCoord+side.offsetX, yCoord+1, zCoord+side.offsetZ, worldObj.provider.dimensionId);
|
||||
Coord4D pull = new Coord4D(xCoord, yCoord+1, zCoord);
|
||||
|
||||
if(location.equals(eject))
|
||||
{
|
||||
|
@ -1154,7 +1154,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I
|
|||
|
||||
for(EntityPlayer player : playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(this), getGenericPacket(new ArrayList())), player);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(this), getGenericPacket(new ArrayList())), player);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.tileentity;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
|
@ -100,7 +100,7 @@ public class TileEntityDiversionTransporter extends TileEntityLogisticalTranspor
|
|||
}
|
||||
|
||||
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleDiverter") + ": " + EnumColor.RED + description));
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this), 50D);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -161,7 +161,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock
|
|||
if(structure != null && isRendering && ticker % 20 == 0)
|
||||
{
|
||||
sendStructure = true;
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this), 50D);
|
||||
}
|
||||
|
||||
if(prevStructure != (structure != null))
|
||||
|
@ -175,7 +175,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock
|
|||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
Object3D obj = Object3D.get(this).getFromSide(side);
|
||||
Coord4D obj = Coord4D.get(this).getFromSide(side);
|
||||
|
||||
if(!(obj.getTileEntity(worldObj) instanceof TileEntityDynamicTank))
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock
|
|||
}
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
|
||||
prevStructure = structure != null;
|
||||
|
@ -252,7 +252,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock
|
|||
structure.fluidStored = null;
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock
|
|||
}
|
||||
}
|
||||
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock
|
|||
structure.volHeight = dataStream.readInt();
|
||||
structure.volWidth = dataStream.readInt();
|
||||
structure.volLength = dataStream.readInt();
|
||||
structure.renderLocation = new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
structure.renderLocation = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
}
|
||||
|
||||
int size = dataStream.readInt();
|
||||
|
@ -410,7 +410,7 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock
|
|||
for(int i = 0; i < size; i++)
|
||||
{
|
||||
ValveData data = new ValveData();
|
||||
data.location = new Object3D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
data.location = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
data.side = ForgeDirection.getOrientation(dataStream.readInt());
|
||||
int viewingTicks = 0;
|
||||
|
||||
|
@ -443,13 +443,13 @@ public class TileEntityDynamicTank extends TileEntityContainerBlock
|
|||
{
|
||||
if(structure != null)
|
||||
{
|
||||
for(Object3D obj : structure.locations)
|
||||
for(Coord4D obj : structure.locations)
|
||||
{
|
||||
TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)obj.getTileEntity(worldObj);
|
||||
|
||||
if(tileEntity != null && tileEntity.isRendering)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import ic2.api.tile.IEnergyStorage;
|
|||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.ICableOutputter;
|
||||
import mekanism.api.energy.IStrictEnergyAcceptor;
|
||||
import mekanism.api.energy.IStrictEnergyStorage;
|
||||
|
@ -63,9 +63,9 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
|||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(!Mekanism.ic2Registered.contains(Object3D.get(this)))
|
||||
if(!Mekanism.ic2Registered.contains(Coord4D.get(this)))
|
||||
{
|
||||
Mekanism.ic2Registered.add(Object3D.get(this));
|
||||
Mekanism.ic2Registered.add(Coord4D.get(this));
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
|||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
Mekanism.ic2Registered.remove(Object3D.get(this));
|
||||
Mekanism.ic2Registered.remove(Coord4D.get(this));
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
|
||||
}
|
||||
|
||||
|
@ -416,7 +416,7 @@ public abstract class TileEntityElectricBlock extends TileEntityContainerBlock i
|
|||
@Override
|
||||
public double injectEnergyUnits(ForgeDirection direction, double i)
|
||||
{
|
||||
if(Object3D.get(this).getFromSide(direction).getTileEntity(worldObj) instanceof TileEntityUniversalCable)
|
||||
if(Coord4D.get(this).getFromSide(direction).getTileEntity(worldObj) instanceof TileEntityUniversalCable)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IConfigurable;
|
||||
import mekanism.common.ISustainedTank;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -39,10 +39,10 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
public FluidTank fluidTank;
|
||||
|
||||
/** The nodes that have full sources near them or in them */
|
||||
public Set<Object3D> recurringNodes = new HashSet<Object3D>();
|
||||
public Set<Coord4D> recurringNodes = new HashSet<Coord4D>();
|
||||
|
||||
/** The nodes that have already been sucked up, but are held on to in order to remove dead blocks */
|
||||
public Set<Object3D> cleaningNodes = new HashSet<Object3D>();
|
||||
public Set<Coord4D> cleaningNodes = new HashSet<Coord4D>();
|
||||
|
||||
public TileEntityElectricPump()
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
{
|
||||
if(suck(true))
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this), 50D);
|
||||
}
|
||||
|
||||
clean(true);
|
||||
|
@ -118,7 +118,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
{
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tileEntity = Object3D.get(this).getFromSide(orientation).getTileEntity(worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(this).getFromSide(orientation).getTileEntity(worldObj);
|
||||
|
||||
if(tileEntity instanceof IFluidHandler)
|
||||
{
|
||||
|
@ -136,12 +136,12 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
|
||||
public boolean suck(boolean take)
|
||||
{
|
||||
List<Object3D> tempPumpList = Arrays.asList(recurringNodes.toArray(new Object3D[recurringNodes.size()]));
|
||||
List<Coord4D> tempPumpList = Arrays.asList(recurringNodes.toArray(new Coord4D[recurringNodes.size()]));
|
||||
Collections.shuffle(tempPumpList);
|
||||
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
Object3D wrapper = Object3D.get(this).getFromSide(orientation);
|
||||
Coord4D wrapper = Coord4D.get(this).getFromSide(orientation);
|
||||
|
||||
if(MekanismUtils.isFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord))
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
if(take)
|
||||
{
|
||||
setEnergy(getEnergy() - 100);
|
||||
recurringNodes.add(new Object3D(wrapper.xCoord, wrapper.yCoord, wrapper.zCoord));
|
||||
recurringNodes.add(new Coord4D(wrapper.xCoord, wrapper.yCoord, wrapper.zCoord));
|
||||
fluidTank.fill(MekanismUtils.getFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord), true);
|
||||
worldObj.setBlockToAir(wrapper.xCoord, wrapper.yCoord, wrapper.zCoord);
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
}
|
||||
}
|
||||
|
||||
for(Object3D wrapper : cleaningNodes)
|
||||
for(Coord4D wrapper : cleaningNodes)
|
||||
{
|
||||
if(MekanismUtils.isFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord))
|
||||
{
|
||||
|
@ -178,7 +178,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
}
|
||||
}
|
||||
|
||||
for(Object3D wrapper : tempPumpList)
|
||||
for(Coord4D wrapper : tempPumpList)
|
||||
{
|
||||
if(MekanismUtils.isFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord))
|
||||
{
|
||||
|
@ -197,9 +197,9 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
Object3D side = wrapper.getFromSide(orientation);
|
||||
Coord4D side = wrapper.getFromSide(orientation);
|
||||
|
||||
if(Object3D.get(this).distanceTo(side) <= 80)
|
||||
if(Coord4D.get(this).distanceTo(side) <= 80)
|
||||
{
|
||||
if(MekanismUtils.isFluid(worldObj, side.xCoord, side.yCoord, side.zCoord))
|
||||
{
|
||||
|
@ -231,7 +231,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
boolean took = false;
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
for(Object3D wrapper : cleaningNodes)
|
||||
for(Coord4D wrapper : cleaningNodes)
|
||||
{
|
||||
if(MekanismUtils.isDeadFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord))
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
}
|
||||
}
|
||||
|
||||
for(Object3D wrapper : recurringNodes)
|
||||
for(Coord4D wrapper : recurringNodes)
|
||||
{
|
||||
if(MekanismUtils.isDeadFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord))
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
Object3D wrapper = Object3D.get(this).getFromSide(orientation);
|
||||
Coord4D wrapper = Coord4D.get(this).getFromSide(orientation);
|
||||
|
||||
if(MekanismUtils.isDeadFluid(worldObj, wrapper.xCoord, wrapper.yCoord, wrapper.zCoord))
|
||||
{
|
||||
|
@ -333,7 +333,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
|
||||
NBTTagList recurringList = new NBTTagList();
|
||||
|
||||
for(Object3D wrapper : recurringNodes)
|
||||
for(Coord4D wrapper : recurringNodes)
|
||||
{
|
||||
NBTTagCompound tagCompound = new NBTTagCompound();
|
||||
wrapper.write(tagCompound);
|
||||
|
@ -347,7 +347,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
|
||||
NBTTagList cleaningList = new NBTTagList();
|
||||
|
||||
for(Object3D obj : cleaningNodes)
|
||||
for(Coord4D obj : cleaningNodes)
|
||||
{
|
||||
cleaningList.appendTag(obj.write(new NBTTagCompound()));
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
|
||||
for(int i = 0; i < tagList.tagCount(); i++)
|
||||
{
|
||||
recurringNodes.add(Object3D.read((NBTTagCompound)tagList.tagAt(i)));
|
||||
recurringNodes.add(Coord4D.read((NBTTagCompound)tagList.tagAt(i)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
|||
|
||||
for(int i = 0; i < tagList.tagCount(); i++)
|
||||
{
|
||||
cleaningNodes.add(Object3D.read((NBTTagCompound)tagList.tagAt(i)));
|
||||
cleaningNodes.add(Coord4D.read((NBTTagCompound)tagList.tagAt(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IRedstoneControl;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
|
@ -252,7 +252,7 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IPo
|
|||
|
||||
if(newScale != prevScale)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this), 50D);
|
||||
}
|
||||
|
||||
prevScale = newScale;
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
|
@ -146,7 +146,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -750,7 +750,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IPerip
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.tileentity;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
|
@ -58,7 +58,7 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
|
|||
GasStack toSend = new GasStack(gasTank.getGas().getGas(), Math.min(gasTank.getStored(), output));
|
||||
gasTank.draw(GasTransmission.emitGasToNetwork(toSend, this, ForgeDirection.getOrientation(facing)), true);
|
||||
|
||||
TileEntity tileEntity = Object3D.get(this).getFromSide(ForgeDirection.getOrientation(facing)).getTileEntity(worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(this).getFromSide(ForgeDirection.getOrientation(facing)).getTileEntity(worldObj);
|
||||
|
||||
if(tileEntity instanceof IGasHandler)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.EnumSet;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.HashList;
|
||||
import mekanism.common.IActiveState;
|
||||
import mekanism.common.ILogisticalTransporter;
|
||||
|
@ -77,8 +77,8 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
|
||||
if(MekanismUtils.canFunction(this) && delayTicks == 0)
|
||||
{
|
||||
TileEntity back = Object3D.get(this).getFromSide(ForgeDirection.getOrientation(facing).getOpposite()).getTileEntity(worldObj);
|
||||
TileEntity front = Object3D.get(this).getFromSide(ForgeDirection.getOrientation(facing)).getTileEntity(worldObj);
|
||||
TileEntity back = Coord4D.get(this).getFromSide(ForgeDirection.getOrientation(facing).getOpposite()).getTileEntity(worldObj);
|
||||
TileEntity front = Coord4D.get(this).getFromSide(ForgeDirection.getOrientation(facing)).getTileEntity(worldObj);
|
||||
|
||||
if(back instanceof IInventory && (front instanceof ILogisticalTransporter || front instanceof IInventory))
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
{
|
||||
for(EntityPlayer player : playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(this), getGenericPacket(new ArrayList())), player);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(this), getGenericPacket(new ArrayList())), player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
|
||||
public boolean canSendHome(ItemStack stack)
|
||||
{
|
||||
TileEntity back = Object3D.get(this).getFromSide(ForgeDirection.getOrientation(facing).getOpposite()).getTileEntity(worldObj);
|
||||
TileEntity back = Coord4D.get(this).getFromSide(ForgeDirection.getOrientation(facing).getOpposite()).getTileEntity(worldObj);
|
||||
|
||||
if(back instanceof IInventory)
|
||||
{
|
||||
|
@ -427,12 +427,12 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
|
||||
public boolean hasInventory()
|
||||
{
|
||||
return Object3D.get(this).getFromSide(ForgeDirection.getOrientation(facing).getOpposite()).getTileEntity(worldObj) instanceof IInventory;
|
||||
return Coord4D.get(this).getFromSide(ForgeDirection.getOrientation(facing).getOpposite()).getTileEntity(worldObj) instanceof IInventory;
|
||||
}
|
||||
|
||||
public ItemStack sendHome(ItemStack stack)
|
||||
{
|
||||
TileEntity back = Object3D.get(this).getFromSide(ForgeDirection.getOrientation(facing).getOpposite()).getTileEntity(worldObj);
|
||||
TileEntity back = Coord4D.get(this).getFromSide(ForgeDirection.getOrientation(facing).getOpposite()).getTileEntity(worldObj);
|
||||
|
||||
if(back instanceof IInventory)
|
||||
{
|
||||
|
@ -476,7 +476,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getFilterPacket(new ArrayList())), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getFilterPacket(new ArrayList())), Coord4D.get(this), 50D);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
|
||||
if(clientActive != active)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
if(active)
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.HashSet;
|
|||
import java.util.Set;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.HashList;
|
||||
import mekanism.common.IConfigurable;
|
||||
import mekanism.common.ILogisticalTransporter;
|
||||
|
@ -81,12 +81,12 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
|
||||
if(stack.progress > 100)
|
||||
{
|
||||
Object3D prevSet = null;
|
||||
Coord4D prevSet = null;
|
||||
|
||||
if(stack.hasPath())
|
||||
{
|
||||
int currentIndex = stack.pathToTarget.indexOf(Object3D.get(this));
|
||||
Object3D next = stack.pathToTarget.get(currentIndex-1);
|
||||
int currentIndex = stack.pathToTarget.indexOf(Coord4D.get(this));
|
||||
Coord4D next = stack.pathToTarget.get(currentIndex-1);
|
||||
|
||||
if(!stack.isFinal(this))
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
|
||||
for(TransporterStack stack : remove)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getSyncPacket(stack, true)), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getSyncPacket(stack, true)), Coord4D.get(this), 50D);
|
||||
transit.remove(stack);
|
||||
MekanismUtils.saveChunk(this);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
{
|
||||
if(transit.contains(stack))
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getSyncPacket(stack, false)), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getSyncPacket(stack, false)), Coord4D.get(this), 50D);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
}
|
||||
}
|
||||
|
||||
private boolean recalculate(TransporterStack stack, Object3D from)
|
||||
private boolean recalculate(TransporterStack stack, Coord4D from)
|
||||
{
|
||||
needsSync.add(stack);
|
||||
|
||||
|
@ -244,7 +244,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
}
|
||||
|
||||
@Override
|
||||
public ItemStack insert(Object3D original, ItemStack itemStack, EnumColor color, boolean doEmit, int min)
|
||||
public ItemStack insert(Coord4D original, ItemStack itemStack, EnumColor color, boolean doEmit, int min)
|
||||
{
|
||||
TransporterStack stack = new TransporterStack();
|
||||
stack.itemStack = itemStack;
|
||||
|
@ -265,7 +265,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
|
||||
transit.add(stack);
|
||||
TransporterManager.add(stack);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getSyncPacket(stack, false)), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getSyncPacket(stack, false)), Coord4D.get(this), 50D);
|
||||
MekanismUtils.saveChunk(this);
|
||||
return rejected;
|
||||
}
|
||||
|
@ -278,8 +278,8 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
{
|
||||
TransporterStack stack = new TransporterStack();
|
||||
stack.itemStack = itemStack;
|
||||
stack.originalLocation = Object3D.get(outputter);
|
||||
stack.homeLocation = Object3D.get(outputter);
|
||||
stack.originalLocation = Coord4D.get(outputter);
|
||||
stack.homeLocation = Coord4D.get(outputter);
|
||||
stack.color = color;
|
||||
|
||||
if(!stack.canInsertToTransporter(this))
|
||||
|
@ -295,7 +295,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
|
||||
transit.add(stack);
|
||||
TransporterManager.add(stack);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getSyncPacket(stack, false)), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getSyncPacket(stack, false)), Coord4D.get(this), 50D);
|
||||
MekanismUtils.saveChunk(this);
|
||||
return rejected;
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
{
|
||||
stack.progress = 0;
|
||||
transit.add(stack);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getSyncPacket(stack, false)), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getSyncPacket(stack, false)), Coord4D.get(this), 50D);
|
||||
MekanismUtils.saveChunk(this);
|
||||
}
|
||||
|
||||
|
@ -319,7 +319,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Object3D.get(this)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -525,7 +525,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
{
|
||||
if(doAdd)
|
||||
{
|
||||
TileEntity tile = Object3D.get(this).getFromSide(from).getTileEntity(worldObj);
|
||||
TileEntity tile = Coord4D.get(this).getFromSide(from).getTileEntity(worldObj);
|
||||
|
||||
ItemStack rejects = TransporterUtils.insert(tile, this, stack, null, true, 0);
|
||||
return TransporterManager.getToUse(stack, rejects).stackSize;
|
||||
|
@ -544,7 +544,7 @@ public class TileEntityLogisticalTransporter extends TileEntity implements ITile
|
|||
public boolean onSneakRightClick(EntityPlayer player, int side)
|
||||
{
|
||||
TransporterUtils.incrementColor(this);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), Object3D.get(this), 50D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this), 50D);
|
||||
player.sendChatToPlayer(ChatMessageComponent.createFromText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleColor") + ": " + (color != null ? color.getName() : EnumColor.BLACK + MekanismUtils.localize("gui.none"))));
|
||||
|
||||
return true;
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.api.transmitters.TransmitterNetworkRegistry;
|
||||
|
@ -120,7 +120,7 @@ public class TileEntityMechanicalPipe extends TileEntityTransmitter<FluidNetwork
|
|||
{
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tileEntity = Object3D.get(this).getFromSide(side).getTileEntity(worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(this).getFromSide(side).getTileEntity(worldObj);
|
||||
|
||||
if(TransmissionType.checkTransmissionType(tileEntity, getTransmissionType()))
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ public class TileEntityMechanicalPipe extends TileEntityTransmitter<FluidNetwork
|
|||
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Object3D.get(this)));
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketDataRequest().setParams(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -281,7 +281,7 @@ public class TileEntityMechanicalPipe extends TileEntityTransmitter<FluidNetwork
|
|||
{
|
||||
isActive = !isActive;
|
||||
refreshTransmitterNetwork();
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package mekanism.common.tileentity;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.infuse.InfuseObject;
|
||||
import mekanism.api.infuse.InfuseRegistry;
|
||||
import mekanism.api.infuse.InfuseType;
|
||||
|
@ -125,7 +125,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -506,7 +506,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.tileentity;
|
|||
|
||||
import java.util.HashSet;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.GasNetwork;
|
||||
import mekanism.api.gas.GasTransmission;
|
||||
import mekanism.api.gas.IGasTransmitter;
|
||||
|
@ -96,7 +96,7 @@ public class TileEntityPressurizedTube extends TileEntityTransmitter<GasNetwork>
|
|||
{
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tileEntity = Object3D.get(this).getFromSide(side).getTileEntity(worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(this).getFromSide(side).getTileEntity(worldObj);
|
||||
|
||||
if(TransmissionType.checkTransmissionType(tileEntity, TransmissionType.GAS, this))
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.tileentity;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
|
@ -92,7 +92,7 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
|
|||
|
||||
if(updateDelay == 0 && clientActive != isActive)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
|
|||
GasStack toSend = new GasStack(gasTank.getGas().getGas(), Math.min(gasTank.getGas().amount, gasOutput));
|
||||
gasTank.draw(GasTransmission.emitGasToNetwork(toSend, this, MekanismUtils.getLeft(facing)), true);
|
||||
|
||||
TileEntity tileEntity = Object3D.get(this).getFromSide(MekanismUtils.getLeft(facing)).getTileEntity(worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(this).getFromSide(MekanismUtils.getLeft(facing)).getTileEntity(worldObj);
|
||||
|
||||
if(tileEntity instanceof IGasHandler)
|
||||
{
|
||||
|
@ -289,7 +289,7 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
|
|||
|
||||
for(EntityPlayer player : playersUsing)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), player);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), player);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -409,7 +409,7 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
|
|||
|
||||
if(clientActive != active && updateDelay == 0)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())));
|
||||
PacketHandler.sendPacket(Transmission.ALL_CLIENTS, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())));
|
||||
|
||||
updateDelay = 10;
|
||||
clientActive = active;
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
|
@ -73,19 +73,19 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
|||
{
|
||||
if(Mekanism.teleporters.containsKey(code))
|
||||
{
|
||||
if(!Mekanism.teleporters.get(code).contains(Object3D.get(this)) && hasFrame())
|
||||
if(!Mekanism.teleporters.get(code).contains(Coord4D.get(this)) && hasFrame())
|
||||
{
|
||||
Mekanism.teleporters.get(code).add(Object3D.get(this));
|
||||
Mekanism.teleporters.get(code).add(Coord4D.get(this));
|
||||
}
|
||||
else if(Mekanism.teleporters.get(code).contains(Object3D.get(this)) && !hasFrame())
|
||||
else if(Mekanism.teleporters.get(code).contains(Coord4D.get(this)) && !hasFrame())
|
||||
{
|
||||
Mekanism.teleporters.get(code).remove(Object3D.get(this));
|
||||
Mekanism.teleporters.get(code).remove(Coord4D.get(this));
|
||||
}
|
||||
}
|
||||
else if(hasFrame())
|
||||
{
|
||||
ArrayList<Object3D> newCoords = new ArrayList<Object3D>();
|
||||
newCoords.add(Object3D.get(this));
|
||||
ArrayList<Coord4D> newCoords = new ArrayList<Coord4D>();
|
||||
newCoords.add(Coord4D.get(this));
|
||||
Mekanism.teleporters.put(code, newCoords);
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
|||
|
||||
if(shouldRender != prevShouldRender)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Object3D.get(this), getNetworkedData(new ArrayList())), Object3D.get(this), 40D);
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketTileEntity().setParams(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this), 40D);
|
||||
}
|
||||
|
||||
prevShouldRender = shouldRender;
|
||||
|
@ -203,11 +203,11 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
|||
{
|
||||
List<Entity> entitiesInPortal = getToTeleport();
|
||||
|
||||
Object3D closestCoords = null;
|
||||
Coord4D closestCoords = null;
|
||||
|
||||
for(Object3D coords : Mekanism.teleporters.get(code))
|
||||
for(Coord4D coords : Mekanism.teleporters.get(code))
|
||||
{
|
||||
if(!coords.equals(Object3D.get(this)))
|
||||
if(!coords.equals(Coord4D.get(this)))
|
||||
{
|
||||
closestCoords = coords;
|
||||
break;
|
||||
|
@ -243,11 +243,11 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
|||
|
||||
List<Entity> entitiesInPortal = getToTeleport();
|
||||
|
||||
Object3D closestCoords = null;
|
||||
Coord4D closestCoords = null;
|
||||
|
||||
for(Object3D coords : Mekanism.teleporters.get(code))
|
||||
for(Coord4D coords : Mekanism.teleporters.get(code))
|
||||
{
|
||||
if(!coords.equals(Object3D.get(this)))
|
||||
if(!coords.equals(Coord4D.get(this)))
|
||||
{
|
||||
closestCoords = coords;
|
||||
break;
|
||||
|
@ -277,7 +277,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
|||
teleportEntityTo(entity, closestCoords, teleporter);
|
||||
}
|
||||
|
||||
for(Object3D coords : Mekanism.teleporters.get(code))
|
||||
for(Coord4D coords : Mekanism.teleporters.get(code))
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.CLIENTS_RANGE, new PacketPortalFX().setParams(coords), coords, 40D);
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
|||
}
|
||||
}
|
||||
|
||||
public void teleportEntityTo(Entity entity, Object3D coord, TileEntityTeleporter teleporter)
|
||||
public void teleportEntityTo(Entity entity, Coord4D coord, TileEntityTeleporter teleporter)
|
||||
{
|
||||
MinecraftServer server = MinecraftServer.getServer();
|
||||
WorldServer world = server.worldServerForDimension(coord.dimensionId);
|
||||
|
@ -343,9 +343,9 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
|||
{
|
||||
if(Mekanism.teleporters.containsKey(code))
|
||||
{
|
||||
if(Mekanism.teleporters.get(code).contains(Object3D.get(this)))
|
||||
if(Mekanism.teleporters.get(code).contains(Coord4D.get(this)))
|
||||
{
|
||||
Mekanism.teleporters.get(code).remove(Object3D.get(this));
|
||||
Mekanism.teleporters.get(code).remove(Coord4D.get(this));
|
||||
}
|
||||
|
||||
if(Mekanism.teleporters.get(code).isEmpty())
|
||||
|
@ -356,7 +356,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
|||
}
|
||||
}
|
||||
|
||||
public int calculateEnergyCost(Entity entity, Object3D coords)
|
||||
public int calculateEnergyCost(Entity entity, Coord4D coords)
|
||||
{
|
||||
int energyCost = 1000;
|
||||
|
||||
|
@ -420,9 +420,9 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IPe
|
|||
{
|
||||
if(Mekanism.teleporters.containsKey(code))
|
||||
{
|
||||
if(Mekanism.teleporters.get(code).contains(Object3D.get(this)))
|
||||
if(Mekanism.teleporters.get(code).contains(Coord4D.get(this)))
|
||||
{
|
||||
Mekanism.teleporters.get(code).remove(Object3D.get(this));
|
||||
Mekanism.teleporters.get(code).remove(Coord4D.get(this));
|
||||
}
|
||||
|
||||
if(Mekanism.teleporters.get(code).isEmpty()) Mekanism.teleporters.remove(code);
|
||||
|
|
|
@ -2,7 +2,7 @@ package mekanism.common.tileentity;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.DynamicNetwork;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
import mekanism.api.transmitters.TransmitterNetworkRegistry;
|
||||
|
|
|
@ -6,7 +6,7 @@ import ic2.api.energy.tile.IEnergySink;
|
|||
|
||||
import java.util.HashSet;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.api.transmitters.TransmitterNetworkRegistry;
|
||||
|
@ -98,7 +98,7 @@ public class TileEntityUniversalCable extends TileEntityTransmitter<EnergyNetwor
|
|||
{
|
||||
TransmitterNetworkRegistry.getInstance().pruneEmptyNetworks();
|
||||
|
||||
Mekanism.ic2Registered.remove(Object3D.get(this));
|
||||
Mekanism.ic2Registered.remove(Coord4D.get(this));
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ public class TileEntityUniversalCable extends TileEntityTransmitter<EnergyNetwor
|
|||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
Mekanism.ic2Registered.remove(Object3D.get(this));
|
||||
Mekanism.ic2Registered.remove(Coord4D.get(this));
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public class TileEntityUniversalCable extends TileEntityTransmitter<EnergyNetwor
|
|||
{
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity tileEntity = Object3D.get(this).getFromSide(side).getTileEntity(worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(this).getFromSide(side).getTileEntity(worldObj);
|
||||
|
||||
if(TransmissionType.checkTransmissionType(tileEntity, TransmissionType.ENERGY))
|
||||
{
|
||||
|
@ -155,9 +155,9 @@ public class TileEntityUniversalCable extends TileEntityTransmitter<EnergyNetwor
|
|||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(!Mekanism.ic2Registered.contains(Object3D.get(this)))
|
||||
if(!Mekanism.ic2Registered.contains(Coord4D.get(this)))
|
||||
{
|
||||
Mekanism.ic2Registered.add(Object3D.get(this));
|
||||
Mekanism.ic2Registered.add(Coord4D.get(this));
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.IInvConfiguration;
|
||||
import mekanism.common.tileentity.TileEntityBin;
|
||||
import mekanism.common.transporter.TransporterStack.Path;
|
||||
|
@ -33,7 +33,7 @@ public class TransporterManager
|
|||
flowingStacks.remove(stack);
|
||||
}
|
||||
|
||||
public static List<TransporterStack> getStacksToDest(Object3D dest)
|
||||
public static List<TransporterStack> getStacksToDest(Coord4D dest)
|
||||
{
|
||||
List<TransporterStack> ret = new ArrayList<TransporterStack>();
|
||||
|
||||
|
@ -254,7 +254,7 @@ public class TransporterManager
|
|||
return itemStack;
|
||||
}
|
||||
|
||||
List<TransporterStack> insertQueue = getStacksToDest(Object3D.get(tileEntity));
|
||||
List<TransporterStack> insertQueue = getStacksToDest(Coord4D.get(tileEntity));
|
||||
|
||||
for(TransporterStack tStack : insertQueue)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.ILogisticalTransporter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||
import mekanism.common.transporter.TransporterPathfinder.Pathfinder.DestChecker;
|
||||
|
@ -27,20 +27,20 @@ public final class TransporterPathfinder
|
|||
{
|
||||
public World worldObj;
|
||||
|
||||
public Object3D start;
|
||||
public Coord4D start;
|
||||
|
||||
public Set<Destination> destinations = new HashSet<Destination>();
|
||||
|
||||
public TransporterStack transportStack;
|
||||
|
||||
public IdlePath(World world, Object3D obj, TransporterStack stack)
|
||||
public IdlePath(World world, Coord4D obj, TransporterStack stack)
|
||||
{
|
||||
worldObj = world;
|
||||
start = obj;
|
||||
transportStack = stack;
|
||||
}
|
||||
|
||||
public void loop(Object3D pointer, ArrayList<Object3D> currentPath, int dist)
|
||||
public void loop(Coord4D pointer, ArrayList<Coord4D> currentPath, int dist)
|
||||
{
|
||||
if(pointer == null)
|
||||
{
|
||||
|
@ -63,11 +63,11 @@ public final class TransporterPathfinder
|
|||
{
|
||||
TileEntity tile = pointer.getFromSide(side).getTileEntity(worldObj);
|
||||
|
||||
if(transportStack.canInsertToTransporter(tile) && !currentPath.contains(Object3D.get(tile)))
|
||||
if(transportStack.canInsertToTransporter(tile) && !currentPath.contains(Coord4D.get(tile)))
|
||||
{
|
||||
if(TransporterUtils.checkDiversionLogic(pointer.getTileEntity(worldObj), tile, side.ordinal()))
|
||||
{
|
||||
loop(Object3D.get(tile), (ArrayList<Object3D>)currentPath.clone(), dist);
|
||||
loop(Coord4D.get(tile), (ArrayList<Coord4D>)currentPath.clone(), dist);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
@ -79,9 +79,9 @@ public final class TransporterPathfinder
|
|||
}
|
||||
}
|
||||
|
||||
public List<Object3D> find()
|
||||
public List<Coord4D> find()
|
||||
{
|
||||
loop(start, new ArrayList<Object3D>(), 0);
|
||||
loop(start, new ArrayList<Coord4D>(), 0);
|
||||
|
||||
Destination farthest = null;
|
||||
|
||||
|
@ -107,13 +107,13 @@ public final class TransporterPathfinder
|
|||
|
||||
public static class Destination implements Comparable<Destination>
|
||||
{
|
||||
public List<Object3D> path = new ArrayList<Object3D>();
|
||||
public List<Coord4D> path = new ArrayList<Coord4D>();
|
||||
public double score;
|
||||
public ItemStack rejected;
|
||||
|
||||
public Destination(ArrayList<Object3D> list, double d, boolean inv, ItemStack rejects)
|
||||
public Destination(ArrayList<Coord4D> list, double d, boolean inv, ItemStack rejects)
|
||||
{
|
||||
path = (List<Object3D>)list.clone();
|
||||
path = (List<Coord4D>)list.clone();
|
||||
|
||||
if(inv)
|
||||
{
|
||||
|
@ -160,24 +160,24 @@ public final class TransporterPathfinder
|
|||
{
|
||||
public World worldObj;
|
||||
|
||||
public Set<Object3D> iterated = new HashSet<Object3D>();
|
||||
public Set<Coord4D> iterated = new HashSet<Coord4D>();
|
||||
|
||||
public Set<Object3D> destsFound = new HashSet<Object3D>();
|
||||
public Set<Coord4D> destsFound = new HashSet<Coord4D>();
|
||||
|
||||
public Map<Object3D, ItemStack> rejects = new HashMap<Object3D, ItemStack>();
|
||||
public Map<Coord4D, ItemStack> rejects = new HashMap<Coord4D, ItemStack>();
|
||||
|
||||
public Object3D start;
|
||||
public Coord4D start;
|
||||
|
||||
public TransporterStack transportStack;
|
||||
|
||||
public InventoryFinder(World world, Object3D obj, TransporterStack stack)
|
||||
public InventoryFinder(World world, Coord4D obj, TransporterStack stack)
|
||||
{
|
||||
worldObj = world;
|
||||
start = obj;
|
||||
transportStack = stack;
|
||||
}
|
||||
|
||||
public void loop(Object3D pointer)
|
||||
public void loop(Coord4D pointer)
|
||||
{
|
||||
if(pointer == null)
|
||||
{
|
||||
|
@ -192,7 +192,7 @@ public final class TransporterPathfinder
|
|||
|
||||
if(tile != null)
|
||||
{
|
||||
if(Object3D.get(tile).equals(transportStack.originalLocation))
|
||||
if(Coord4D.get(tile).equals(transportStack.originalLocation))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -203,19 +203,19 @@ public final class TransporterPathfinder
|
|||
|
||||
if(TransporterManager.didEmit(transportStack.itemStack, stack))
|
||||
{
|
||||
destsFound.add(Object3D.get(tile));
|
||||
rejects.put(Object3D.get(tile), stack);
|
||||
destsFound.add(Coord4D.get(tile));
|
||||
rejects.put(Coord4D.get(tile), stack);
|
||||
}
|
||||
}
|
||||
else if(transportStack.canInsertToTransporter(tile) && !iterated.contains(Object3D.get(tile)))
|
||||
else if(transportStack.canInsertToTransporter(tile) && !iterated.contains(Coord4D.get(tile)))
|
||||
{
|
||||
loop(Object3D.get(tile));
|
||||
loop(Coord4D.get(tile));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Set<Object3D> find()
|
||||
public Set<Coord4D> find()
|
||||
{
|
||||
loop(start);
|
||||
|
||||
|
@ -234,13 +234,13 @@ public final class TransporterPathfinder
|
|||
}
|
||||
};
|
||||
|
||||
InventoryFinder d = new InventoryFinder(start.getTile().worldObj, Object3D.get(start.getTile()), stack);
|
||||
Set<Object3D> destsFound = d.find();
|
||||
InventoryFinder d = new InventoryFinder(start.getTile().worldObj, Coord4D.get(start.getTile()), stack);
|
||||
Set<Coord4D> destsFound = d.find();
|
||||
List<Destination> paths = new ArrayList<Destination>();
|
||||
|
||||
for(Object3D obj : destsFound)
|
||||
for(Coord4D obj : destsFound)
|
||||
{
|
||||
Pathfinder p = new Pathfinder(checker, start.getTile().worldObj, obj, Object3D.get(start.getTile()), stack);
|
||||
Pathfinder p = new Pathfinder(checker, start.getTile().worldObj, obj, Coord4D.get(start.getTile()), stack);
|
||||
|
||||
if(p.getPath().size() >= 2)
|
||||
{
|
||||
|
@ -272,7 +272,7 @@ public final class TransporterPathfinder
|
|||
{
|
||||
List<Destination> paths = getPaths(start, stack, min);
|
||||
|
||||
Map<Object3D, Destination> destPaths = new HashMap<Object3D, Destination>();
|
||||
Map<Coord4D, Destination> destPaths = new HashMap<Coord4D, Destination>();
|
||||
|
||||
for(Destination d : paths)
|
||||
{
|
||||
|
@ -320,15 +320,15 @@ public final class TransporterPathfinder
|
|||
|
||||
public static class Pathfinder
|
||||
{
|
||||
public final Set<Object3D> openSet, closedSet;
|
||||
public final Set<Coord4D> openSet, closedSet;
|
||||
|
||||
public final HashMap<Object3D, Object3D> navMap;
|
||||
public final HashMap<Coord4D, Coord4D> navMap;
|
||||
|
||||
public final HashMap<Object3D, Double> gScore, fScore;
|
||||
public final HashMap<Coord4D, Double> gScore, fScore;
|
||||
|
||||
public final Object3D start;
|
||||
public final Coord4D start;
|
||||
|
||||
public final Object3D finalNode;
|
||||
public final Coord4D finalNode;
|
||||
|
||||
public final TransporterStack transportStack;
|
||||
|
||||
|
@ -336,11 +336,11 @@ public final class TransporterPathfinder
|
|||
|
||||
public double finalScore;
|
||||
|
||||
public ArrayList<Object3D> results;
|
||||
public ArrayList<Coord4D> results;
|
||||
|
||||
private World worldObj;
|
||||
|
||||
public Pathfinder(DestChecker checker, World world, Object3D finishObj, Object3D startObj, TransporterStack stack)
|
||||
public Pathfinder(DestChecker checker, World world, Coord4D finishObj, Coord4D startObj, TransporterStack stack)
|
||||
{
|
||||
destChecker = checker;
|
||||
worldObj = world;
|
||||
|
@ -350,20 +350,20 @@ public final class TransporterPathfinder
|
|||
|
||||
transportStack = stack;
|
||||
|
||||
openSet = new HashSet<Object3D>();
|
||||
closedSet = new HashSet<Object3D>();
|
||||
openSet = new HashSet<Coord4D>();
|
||||
closedSet = new HashSet<Coord4D>();
|
||||
|
||||
navMap = new HashMap<Object3D, Object3D>();
|
||||
navMap = new HashMap<Coord4D, Coord4D>();
|
||||
|
||||
gScore = new HashMap<Object3D, Double>();
|
||||
fScore = new HashMap<Object3D, Double>();
|
||||
gScore = new HashMap<Coord4D, Double>();
|
||||
fScore = new HashMap<Coord4D, Double>();
|
||||
|
||||
results = new ArrayList<Object3D>();
|
||||
results = new ArrayList<Coord4D>();
|
||||
|
||||
find(start);
|
||||
}
|
||||
|
||||
public boolean find(Object3D start)
|
||||
public boolean find(Coord4D start)
|
||||
{
|
||||
openSet.add(start);
|
||||
gScore.put(start, 0D);
|
||||
|
@ -374,7 +374,7 @@ public final class TransporterPathfinder
|
|||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
ForgeDirection direction = ForgeDirection.getOrientation(i);
|
||||
Object3D neighbor = start.translate(direction.offsetX, direction.offsetY, direction.offsetZ);
|
||||
Coord4D neighbor = start.translate(direction.offsetX, direction.offsetY, direction.offsetZ);
|
||||
|
||||
if(!transportStack.canInsertToTransporter(neighbor.getTileEntity(worldObj)) && (!neighbor.equals(finalNode) || !destChecker.isValid(transportStack, i, neighbor.getTileEntity(worldObj))))
|
||||
{
|
||||
|
@ -391,10 +391,10 @@ public final class TransporterPathfinder
|
|||
|
||||
while(!openSet.isEmpty())
|
||||
{
|
||||
Object3D currentNode = null;
|
||||
Coord4D currentNode = null;
|
||||
double lowestFScore = 0;
|
||||
|
||||
for(Object3D node : openSet)
|
||||
for(Coord4D node : openSet)
|
||||
{
|
||||
if(currentNode == null || fScore.get(node) < lowestFScore)
|
||||
{
|
||||
|
@ -414,7 +414,7 @@ public final class TransporterPathfinder
|
|||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
ForgeDirection direction = ForgeDirection.getOrientation(i);
|
||||
Object3D neighbor = currentNode.getFromSide(direction);
|
||||
Coord4D neighbor = currentNode.getFromSide(direction);
|
||||
|
||||
if(transportStack.canInsertToTransporter(neighbor.getTileEntity(worldObj)))
|
||||
{
|
||||
|
@ -460,9 +460,9 @@ public final class TransporterPathfinder
|
|||
return false;
|
||||
}
|
||||
|
||||
private ArrayList<Object3D> reconstructPath(HashMap<Object3D, Object3D> naviMap, Object3D currentNode)
|
||||
private ArrayList<Coord4D> reconstructPath(HashMap<Coord4D, Coord4D> naviMap, Coord4D currentNode)
|
||||
{
|
||||
ArrayList<Object3D> path = new ArrayList<Object3D>();
|
||||
ArrayList<Coord4D> path = new ArrayList<Coord4D>();
|
||||
|
||||
path.add(currentNode);
|
||||
|
||||
|
@ -476,16 +476,16 @@ public final class TransporterPathfinder
|
|||
return path;
|
||||
}
|
||||
|
||||
public ArrayList<Object3D> getPath()
|
||||
public ArrayList<Coord4D> getPath()
|
||||
{
|
||||
ArrayList<Object3D> path = new ArrayList<Object3D>();
|
||||
ArrayList<Coord4D> path = new ArrayList<Coord4D>();
|
||||
path.add(finalNode);
|
||||
path.addAll((ArrayList<Object3D>)results.clone());
|
||||
path.addAll((ArrayList<Coord4D>)results.clone());
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
private double getEstimate(Object3D start, Object3D target2)
|
||||
private double getEstimate(Coord4D start, Coord4D target2)
|
||||
{
|
||||
return start.distanceTo(target2);
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ public final class TransporterPathfinder
|
|||
}
|
||||
}
|
||||
|
||||
public static List<Object3D> getIdlePath(ILogisticalTransporter start, TransporterStack stack)
|
||||
public static List<Coord4D> getIdlePath(ILogisticalTransporter start, TransporterStack stack)
|
||||
{
|
||||
if(stack.homeLocation != null)
|
||||
{
|
||||
|
@ -512,8 +512,8 @@ public final class TransporterPathfinder
|
|||
}
|
||||
};
|
||||
|
||||
Pathfinder p = new Pathfinder(checker, start.getTile().worldObj, stack.homeLocation, Object3D.get(start.getTile()), stack);
|
||||
List<Object3D> path = p.getPath();
|
||||
Pathfinder p = new Pathfinder(checker, start.getTile().worldObj, stack.homeLocation, Coord4D.get(start.getTile()), stack);
|
||||
List<Coord4D> path = p.getPath();
|
||||
|
||||
if(path.size() >= 2)
|
||||
{
|
||||
|
@ -528,8 +528,8 @@ public final class TransporterPathfinder
|
|||
}
|
||||
}
|
||||
|
||||
IdlePath d = new IdlePath(start.getTile().worldObj, Object3D.get(start.getTile()), stack);
|
||||
List<Object3D> path = d.find();
|
||||
IdlePath d = new IdlePath(start.getTile().worldObj, Coord4D.get(start.getTile()), stack);
|
||||
List<Coord4D> path = d.find();
|
||||
stack.pathType = Path.NONE;
|
||||
|
||||
if(path == null)
|
||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.ILogisticalTransporter;
|
||||
import mekanism.common.tileentity.TileEntityLogisticalSorter;
|
||||
import mekanism.common.transporter.TransporterPathfinder.Destination;
|
||||
|
@ -25,13 +25,13 @@ public class TransporterStack
|
|||
|
||||
public boolean initiatedPath = false;
|
||||
|
||||
public List<Object3D> pathToTarget = new ArrayList<Object3D>();
|
||||
public List<Coord4D> pathToTarget = new ArrayList<Coord4D>();
|
||||
|
||||
public Object3D originalLocation;
|
||||
public Object3D homeLocation;
|
||||
public Coord4D originalLocation;
|
||||
public Coord4D homeLocation;
|
||||
|
||||
public Object3D clientNext;
|
||||
public Object3D clientPrev;
|
||||
public Coord4D clientNext;
|
||||
public Coord4D clientPrev;
|
||||
|
||||
public Path pathType;
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class TransporterStack
|
|||
data.add(progress);
|
||||
data.add(pathType.ordinal());
|
||||
|
||||
if(pathToTarget.indexOf(Object3D.get(tileEntity.getTile())) > 0)
|
||||
if(pathToTarget.indexOf(Coord4D.get(tileEntity.getTile())) > 0)
|
||||
{
|
||||
data.add(true);
|
||||
getNext(tileEntity).write(data);
|
||||
|
@ -81,10 +81,10 @@ public class TransporterStack
|
|||
|
||||
if(dataStream.readBoolean())
|
||||
{
|
||||
clientNext = Object3D.read(dataStream);
|
||||
clientNext = Coord4D.read(dataStream);
|
||||
}
|
||||
|
||||
clientPrev = Object3D.read(dataStream);
|
||||
clientPrev = Coord4D.read(dataStream);
|
||||
|
||||
itemStack = new ItemStack(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
}
|
||||
|
@ -116,11 +116,11 @@ public class TransporterStack
|
|||
}
|
||||
|
||||
progress = nbtTags.getInteger("progress");
|
||||
originalLocation = Object3D.read(nbtTags.getCompoundTag("originalLocation"));
|
||||
originalLocation = Coord4D.read(nbtTags.getCompoundTag("originalLocation"));
|
||||
|
||||
if(nbtTags.hasKey("homeLocation"))
|
||||
{
|
||||
homeLocation = Object3D.read(nbtTags.getCompoundTag("homeLocation"));
|
||||
homeLocation = Coord4D.read(nbtTags.getCompoundTag("homeLocation"));
|
||||
}
|
||||
|
||||
pathType = Path.values()[nbtTags.getInteger("pathType")];
|
||||
|
@ -184,7 +184,7 @@ public class TransporterStack
|
|||
|
||||
public boolean calculateIdle(ILogisticalTransporter tileEntity)
|
||||
{
|
||||
List<Object3D> newPath = TransporterPathfinder.getIdlePath(tileEntity, this);
|
||||
List<Coord4D> newPath = TransporterPathfinder.getIdlePath(tileEntity, this);
|
||||
|
||||
if(newPath == null)
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ public class TransporterStack
|
|||
|
||||
pathToTarget = newPath;
|
||||
|
||||
originalLocation = Object3D.get(tileEntity.getTile());
|
||||
originalLocation = Coord4D.get(tileEntity.getTile());
|
||||
initiatedPath = true;
|
||||
|
||||
return true;
|
||||
|
@ -201,14 +201,14 @@ public class TransporterStack
|
|||
|
||||
public boolean isFinal(ILogisticalTransporter tileEntity)
|
||||
{
|
||||
return pathToTarget.indexOf(Object3D.get(tileEntity.getTile())) == (pathType == Path.NONE ? 0 : 1);
|
||||
return pathToTarget.indexOf(Coord4D.get(tileEntity.getTile())) == (pathType == Path.NONE ? 0 : 1);
|
||||
}
|
||||
|
||||
public Object3D getNext(ILogisticalTransporter tileEntity)
|
||||
public Coord4D getNext(ILogisticalTransporter tileEntity)
|
||||
{
|
||||
if(!tileEntity.getTile().worldObj.isRemote)
|
||||
{
|
||||
int index = pathToTarget.indexOf(Object3D.get(tileEntity.getTile()))-1;
|
||||
int index = pathToTarget.indexOf(Coord4D.get(tileEntity.getTile()))-1;
|
||||
|
||||
if(index < 0)
|
||||
{
|
||||
|
@ -222,11 +222,11 @@ public class TransporterStack
|
|||
}
|
||||
}
|
||||
|
||||
public Object3D getPrev(ILogisticalTransporter tileEntity)
|
||||
public Coord4D getPrev(ILogisticalTransporter tileEntity)
|
||||
{
|
||||
if(!tileEntity.getTile().worldObj.isRemote)
|
||||
{
|
||||
int index = pathToTarget.indexOf(Object3D.get(tileEntity.getTile()))+1;
|
||||
int index = pathToTarget.indexOf(Coord4D.get(tileEntity.getTile()))+1;
|
||||
|
||||
if(index < pathToTarget.size())
|
||||
{
|
||||
|
@ -247,21 +247,21 @@ public class TransporterStack
|
|||
{
|
||||
if(getPrev(tileEntity) != null)
|
||||
{
|
||||
return Object3D.get(tileEntity.getTile()).sideDifference(getPrev(tileEntity)).ordinal();
|
||||
return Coord4D.get(tileEntity.getTile()).sideDifference(getPrev(tileEntity)).ordinal();
|
||||
}
|
||||
}
|
||||
else if(progress == 50)
|
||||
{
|
||||
if(getNext(tileEntity) != null)
|
||||
{
|
||||
return getNext(tileEntity).sideDifference(Object3D.get(tileEntity.getTile())).ordinal();
|
||||
return getNext(tileEntity).sideDifference(Coord4D.get(tileEntity.getTile())).ordinal();
|
||||
}
|
||||
}
|
||||
else if(progress > 50)
|
||||
{
|
||||
if(getNext(tileEntity) != null)
|
||||
{
|
||||
return getNext(tileEntity).sideDifference(Object3D.get(tileEntity.getTile())).ordinal();
|
||||
return getNext(tileEntity).sideDifference(Coord4D.get(tileEntity.getTile())).ordinal();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ public class TransporterStack
|
|||
return transporter.getColor() == color || transporter.getColor() == null;
|
||||
}
|
||||
|
||||
public Object3D getDest()
|
||||
public Coord4D getDest()
|
||||
{
|
||||
return pathToTarget.get(0);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.energy.ICableOutputter;
|
||||
import mekanism.api.energy.IStrictEnergyAcceptor;
|
||||
import mekanism.api.transmitters.ITransmitter;
|
||||
|
@ -41,7 +41,7 @@ public final class CableUtils
|
|||
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity acceptor = Object3D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
TileEntity acceptor = Coord4D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
|
||||
if(acceptor instanceof IStrictEnergyAcceptor ||
|
||||
acceptor instanceof IEnergySink ||
|
||||
|
@ -69,7 +69,7 @@ public final class CableUtils
|
|||
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity cable = Object3D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
TileEntity cable = Coord4D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
|
||||
if(TransmissionType.checkTransmissionType(cable, TransmissionType.ENERGY))
|
||||
{
|
||||
|
@ -137,7 +137,7 @@ public final class CableUtils
|
|||
|
||||
for(ForgeDirection orientation : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
TileEntity outputter = Object3D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
TileEntity outputter = Coord4D.get(tileEntity).getFromSide(orientation).getTileEntity(tileEntity.worldObj);
|
||||
|
||||
if((outputter instanceof ICableOutputter && ((ICableOutputter)outputter).canOutputTo(orientation.getOpposite())) ||
|
||||
(outputter instanceof IEnergySource && ((IEnergySource)outputter).emitsEnergyTo(tileEntity, orientation.getOpposite())) ||
|
||||
|
@ -164,7 +164,7 @@ public final class CableUtils
|
|||
return false;
|
||||
}
|
||||
|
||||
TileEntity tileEntity = Object3D.get(tile).getFromSide(side).getTileEntity(tile.worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(tile).getFromSide(side).getTileEntity(tile.worldObj);
|
||||
|
||||
return isConnectable(tile, tileEntity, side);
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ public final class CableUtils
|
|||
*/
|
||||
public static double emitEnergyToNetwork(double amount, TileEntity sender, ForgeDirection facing)
|
||||
{
|
||||
TileEntity pointer = Object3D.get(sender).getFromSide(facing).getTileEntity(sender.worldObj);
|
||||
TileEntity pointer = Coord4D.get(sender).getFromSide(facing).getTileEntity(sender.worldObj);
|
||||
|
||||
if(TransmissionType.checkTransmissionType(pointer, TransmissionType.ENERGY))
|
||||
{
|
||||
|
@ -287,7 +287,7 @@ public final class CableUtils
|
|||
|
||||
for(ForgeDirection side : outputtingSides)
|
||||
{
|
||||
TileEntity tileEntity = Object3D.get(emitter).getFromSide(side).getTileEntity(emitter.worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(emitter).getFromSide(side).getTileEntity(emitter.worldObj);
|
||||
double toSend = splitSend+remains;
|
||||
remains = 0;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.common.DynamicTankCache;
|
||||
import mekanism.common.IActiveState;
|
||||
import mekanism.common.IFactory;
|
||||
|
@ -208,7 +208,7 @@ public final class MekanismUtils
|
|||
/**
|
||||
* Returns the closest teleporter between a selection of one or two.
|
||||
*/
|
||||
public static Object3D getClosestCoords(Teleporter.Code teleCode, EntityPlayer player)
|
||||
public static Coord4D getClosestCoords(Teleporter.Code teleCode, EntityPlayer player)
|
||||
{
|
||||
if(Mekanism.teleporters.get(teleCode).size() == 1)
|
||||
{
|
||||
|
@ -217,8 +217,8 @@ public final class MekanismUtils
|
|||
else {
|
||||
int dimensionId = player.worldObj.provider.dimensionId;
|
||||
|
||||
Object3D coords0 = Mekanism.teleporters.get(teleCode).get(0);
|
||||
Object3D coords1 = Mekanism.teleporters.get(teleCode).get(1);
|
||||
Coord4D coords0 = Mekanism.teleporters.get(teleCode).get(0);
|
||||
Coord4D coords1 = Mekanism.teleporters.get(teleCode).get(1);
|
||||
|
||||
int distance0 = (int)player.getDistance(coords0.xCoord, coords0.yCoord, coords0.zCoord);
|
||||
int distance1 = (int)player.getDistance(coords1.xCoord, coords1.yCoord, coords1.zCoord);
|
||||
|
@ -640,7 +640,7 @@ public final class MekanismUtils
|
|||
* @param z - z coordinate
|
||||
* @param orig - original block
|
||||
*/
|
||||
public static void makeBoundingBlock(World world, int x, int y, int z, Object3D orig)
|
||||
public static void makeBoundingBlock(World world, int x, int y, int z, Coord4D orig)
|
||||
{
|
||||
world.setBlock(x, y, z, Mekanism.BoundingBlock.blockID);
|
||||
|
||||
|
@ -658,7 +658,7 @@ public final class MekanismUtils
|
|||
* @param z - z coordinate
|
||||
* @param orig - original block
|
||||
*/
|
||||
public static void makeAdvancedBoundingBlock(World world, int x, int y, int z, Object3D orig)
|
||||
public static void makeAdvancedBoundingBlock(World world, int x, int y, int z, Coord4D orig)
|
||||
{
|
||||
world.setBlock(x, y, z, Mekanism.BoundingBlock.blockID, 1, 3);
|
||||
|
||||
|
@ -833,7 +833,7 @@ public final class MekanismUtils
|
|||
|
||||
if(isBlock)
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketElectricChest().setParams(ElectricChestPacketType.CLIENT_OPEN, 0, id, true, Object3D.get(tileEntity)), player);
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketElectricChest().setParams(ElectricChestPacketType.CLIENT_OPEN, 0, id, true, Coord4D.get(tileEntity)), player);
|
||||
}
|
||||
else {
|
||||
PacketHandler.sendPacket(Transmission.SINGLE_CLIENT, new PacketElectricChest().setParams(ElectricChestPacketType.CLIENT_OPEN, 0, id, false), player);
|
||||
|
@ -854,7 +854,7 @@ public final class MekanismUtils
|
|||
{
|
||||
DynamicTankCache toReturn = Mekanism.dynamicInventories.get(id);
|
||||
|
||||
for(Object3D obj : Mekanism.dynamicInventories.get(id).locations)
|
||||
for(Coord4D obj : Mekanism.dynamicInventories.get(id).locations)
|
||||
{
|
||||
TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)obj.getTileEntity(world);
|
||||
|
||||
|
@ -885,7 +885,7 @@ public final class MekanismUtils
|
|||
DynamicTankCache cache = new DynamicTankCache();
|
||||
cache.inventory = inventory;
|
||||
cache.fluid = fluid;
|
||||
cache.locations.add(Object3D.get(tileEntity));
|
||||
cache.locations.add(Coord4D.get(tileEntity));
|
||||
|
||||
Mekanism.dynamicInventories.put(inventoryID, cache);
|
||||
|
||||
|
@ -895,7 +895,7 @@ public final class MekanismUtils
|
|||
Mekanism.dynamicInventories.get(inventoryID).inventory = inventory;
|
||||
Mekanism.dynamicInventories.get(inventoryID).fluid = fluid;
|
||||
|
||||
Mekanism.dynamicInventories.get(inventoryID).locations.add(Object3D.get(tileEntity));
|
||||
Mekanism.dynamicInventories.get(inventoryID).locations.add(Coord4D.get(tileEntity));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1128,7 +1128,7 @@ public final class MekanismUtils
|
|||
return Mekanism.hooks.BuildCraftLoaded || Mekanism.forceBuildcraft;
|
||||
}
|
||||
|
||||
public static String getCoordDisplay(Object3D obj)
|
||||
public static String getCoordDisplay(Coord4D obj)
|
||||
{
|
||||
return "[" + obj.xCoord + ", " + obj.yCoord + ", " + obj.zCoord + "]";
|
||||
}
|
||||
|
|
|
@ -3,14 +3,14 @@ package mekanism.common.util;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Object3D;
|
||||
import mekanism.api.Coord4D;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public final class MinerUtils
|
||||
{
|
||||
public static List<ItemStack> getDrops(World world, Object3D obj, boolean silk)
|
||||
public static List<ItemStack> getDrops(World world, Coord4D obj, boolean silk)
|
||||
{
|
||||
Block block = Block.blocksList[obj.getBlockId(world)];
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue