mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Fixed pumpjack ports, retrofitted oil and gas ducts, added HD sledge tex
This commit is contained in:
parent
520f24d2fe
commit
bef97b5e84
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
BIN
assets/hbm/textures/gui/gui_turbofan.png
Normal file
BIN
assets/hbm/textures/gui/gui_turbofan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/hbm/textures/items/shimmer_sledge_hd.png
Normal file
BIN
assets/hbm/textures/items/shimmer_sledge_hd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 435 B |
@ -70,7 +70,7 @@ public class MachineIGenerator extends BlockContainer implements IMultiblock {
|
||||
}
|
||||
world.setBlock(x - 3, y, z, ModBlocks.dummy_port_igenerator);
|
||||
TileEntity te2 = world.getTileEntity(x - 3, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
@ -99,7 +99,7 @@ public class MachineIGenerator extends BlockContainer implements IMultiblock {
|
||||
}
|
||||
world.setBlock(x, y, z - 3, ModBlocks.dummy_port_igenerator);
|
||||
TileEntity te2 = world.getTileEntity(x, y, z - 3);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
@ -128,7 +128,7 @@ public class MachineIGenerator extends BlockContainer implements IMultiblock {
|
||||
}
|
||||
world.setBlock(x - 2, y, z, ModBlocks.dummy_port_igenerator);
|
||||
TileEntity te2 = world.getTileEntity(x - 2, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
@ -157,7 +157,7 @@ public class MachineIGenerator extends BlockContainer implements IMultiblock {
|
||||
}
|
||||
world.setBlock(x, y, z - 2, ModBlocks.dummy_port_igenerator);
|
||||
TileEntity te2 = world.getTileEntity(x, y, z - 2);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
|
||||
@ -120,22 +120,38 @@ public class MachinePumpjack extends BlockContainer implements IMultiblock {
|
||||
|
||||
//
|
||||
DummyBlockPumpjack.safeBreak = true;
|
||||
world.setBlock(x + 2, y, z, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te = world.getTileEntity(x + 2, y, z);
|
||||
world.setBlock(x - 2, y, z + 1, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te = world.getTileEntity(x + 2, y, z + 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 3, y, z, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te2 = world.getTileEntity(x - 3, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
world.setBlock(x - 2, y, z - 1, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te2 = world.getTileEntity(x + 2, y, z - 1);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 3, y, z + 1, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te3 = world.getTileEntity(x + 3, y, z + 1);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 3, y, z - 1, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te4 = world.getTileEntity(x + 3, y, z - 1);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockPumpjack.safeBreak = false;
|
||||
//
|
||||
|
||||
@ -149,22 +165,38 @@ public class MachinePumpjack extends BlockContainer implements IMultiblock {
|
||||
|
||||
//
|
||||
DummyBlockPumpjack.safeBreak = true;
|
||||
world.setBlock(x, y, z + 2, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te = world.getTileEntity(x, y, z + 2);
|
||||
world.setBlock(x + 1, y, z - 2, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te = world.getTileEntity(x + 1, y, z - 2);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x, y, z - 3, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te2 = world.getTileEntity(x, y, z - 3);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
world.setBlock(x - 1, y, z - 2, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y, z - 2);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y, z - 3, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y, z - 3);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y, z - 3, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y, z - 3);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockPumpjack.safeBreak = false;
|
||||
//
|
||||
|
||||
@ -178,22 +210,38 @@ public class MachinePumpjack extends BlockContainer implements IMultiblock {
|
||||
|
||||
//
|
||||
DummyBlockPumpjack.safeBreak = true;
|
||||
world.setBlock(x + 3, y, z, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te = world.getTileEntity(x + 3, y, z);
|
||||
world.setBlock(x + 2, y, z + 1, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te = world.getTileEntity(x + 2, y, z + 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 2, y, z, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te2 = world.getTileEntity(x - 2, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
world.setBlock(x + 2, y, z - 1, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te2 = world.getTileEntity(x + 2, y, z - 1);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 3, y, z + 1, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te3 = world.getTileEntity(x + 3, y, z + 1);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 3, y, z - 1, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te4 = world.getTileEntity(x + 3, y, z - 1);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockPumpjack.safeBreak = false;
|
||||
//
|
||||
|
||||
@ -207,22 +255,38 @@ public class MachinePumpjack extends BlockContainer implements IMultiblock {
|
||||
|
||||
//
|
||||
DummyBlockPumpjack.safeBreak = true;
|
||||
world.setBlock(x, y, z + 3, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te = world.getTileEntity(x, y, z + 3);
|
||||
world.setBlock(x + 1, y, z + 2, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te = world.getTileEntity(x + 1, y, z + 2);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x, y, z - 2, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te2 = world.getTileEntity(x, y, z - 2);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
world.setBlock(x - 1, y, z + 2, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y, z + 2);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y, z + 3, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te3 = world.getTileEntity(x + 1, y, z + 3);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y, z + 3, ModBlocks.dummy_port_pumpjack);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y, z + 3);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockPumpjack.safeBreak = false;
|
||||
//
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ public class EntityRubble extends EntityThrowable {
|
||||
p_70184_1_.entityHit.attackEntityFrom(ModDamageSource.rubble, b0);
|
||||
}
|
||||
|
||||
if(this.ticksExisted > 5) {
|
||||
if(this.ticksExisted > 2) {
|
||||
this.setDead();
|
||||
if(!this.worldObj.isRemote)
|
||||
worldObj.createExplosion(this, this.posX, this.posY, this.posZ, 0.1F, true);
|
||||
|
||||
@ -286,31 +286,9 @@ public class Library {
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_drill ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_assembler ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_chemplant ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_refinery)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkOilConnectables(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
if((tileentity != null && tileentity instanceof IOilDuct) ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_well ||
|
||||
world.getBlock(x, y, z) == ModBlocks.machine_refinery)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkGasConnectables(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
if((tileentity != null && tileentity instanceof IGasDuct) ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_well ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_flare)
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_refinery ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_pumpjack ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_turbofan)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -322,13 +300,23 @@ public class Library {
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
if(tileentity != null && tileentity instanceof TileEntityFluidDuct && ((TileEntityFluidDuct)tileentity).type == type)
|
||||
return true;
|
||||
if(tileentity != null && tileentity instanceof TileEntityOilDuct && ((TileEntityOilDuct)tileentity).type == type)
|
||||
return true;
|
||||
if(tileentity != null && tileentity instanceof TileEntityGasDuct && ((TileEntityGasDuct)tileentity).type == type)
|
||||
return true;
|
||||
if(tileentity != null && tileentity instanceof TileEntityOilDuctSolid && ((TileEntityOilDuctSolid)tileentity).type == type)
|
||||
return true;
|
||||
if(tileentity != null && tileentity instanceof TileEntityGasDuctSolid && ((TileEntityGasDuctSolid)tileentity).type == type)
|
||||
return true;
|
||||
if((tileentity != null && (tileentity instanceof IFluidAcceptor ||
|
||||
tileentity instanceof IFluidSource)) ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_well ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_flare ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_chemplant ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_fluidtank ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_refinery)
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_refinery ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_pumpjack ||
|
||||
world.getBlock(x, y, z) == ModBlocks.dummy_port_turbofan)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -348,32 +336,6 @@ public class Library {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkOilUnionListForOil(List<UnionOfTileEntitiesAndBooleansForOil> list, IOilSource that) {
|
||||
|
||||
for(UnionOfTileEntitiesAndBooleansForOil union : list)
|
||||
{
|
||||
if(union.source == that)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkGasUnionListForGas(List<UnionOfTileEntitiesAndBooleansForGas> list, IGasSource that) {
|
||||
|
||||
for(UnionOfTileEntitiesAndBooleansForGas union : list)
|
||||
{
|
||||
if(union.source == that)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean checkUnionListForFluids(List<UnionOfTileEntitiesAndBooleansForFluids> list, IFluidSource that) {
|
||||
|
||||
for(UnionOfTileEntitiesAndBooleansForFluids union : list)
|
||||
@ -869,6 +831,11 @@ public class Library {
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ);
|
||||
}
|
||||
//Pumpjack
|
||||
if(block == ModBlocks.dummy_port_pumpjack)
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetX, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetY, ((TileEntityDummy)worldObj.getTileEntity(x, y, z)).targetZ);
|
||||
}
|
||||
|
||||
if(tileentity instanceof IConductor)
|
||||
{
|
||||
@ -983,195 +950,6 @@ public class Library {
|
||||
}
|
||||
}
|
||||
|
||||
public static void transmitOil(int x, int y, int z, boolean newTact, IOilSource that, World worldObj) {
|
||||
Block block = worldObj.getBlock(x, y, z);
|
||||
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
|
||||
|
||||
if(tileentity instanceof IOilDuct)
|
||||
{
|
||||
if(tileentity instanceof TileEntityOilDuct)
|
||||
{
|
||||
if(Library.checkOilUnionListForOil(((TileEntityOilDuct)tileentity).uoteab, that))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityOilDuct)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityOilDuct)tileentity).uoteab.get(i).source == that)
|
||||
{
|
||||
if(((TileEntityOilDuct)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityOilDuct)tileentity).uoteab.get(i).ticked = newTact;
|
||||
that.fill(x, y + 1, z, that.getTact());
|
||||
that.fill(x, y - 1, z, that.getTact());
|
||||
that.fill(x - 1, y, z, that.getTact());
|
||||
that.fill(x + 1, y, z, that.getTact());
|
||||
that.fill(x, y, z - 1, that.getTact());
|
||||
that.fill(x, y, z + 1, that.getTact());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityOilDuct)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForOil(that, newTact));
|
||||
}
|
||||
}
|
||||
if(tileentity instanceof TileEntityOilDuctSolid)
|
||||
{
|
||||
if(Library.checkOilUnionListForOil(((TileEntityOilDuctSolid)tileentity).uoteab, that))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityOilDuctSolid)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityOilDuctSolid)tileentity).uoteab.get(i).source == that)
|
||||
{
|
||||
if(((TileEntityOilDuctSolid)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityOilDuctSolid)tileentity).uoteab.get(i).ticked = newTact;
|
||||
that.fill(x, y + 1, z, that.getTact());
|
||||
that.fill(x, y - 1, z, that.getTact());
|
||||
that.fill(x - 1, y, z, that.getTact());
|
||||
that.fill(x + 1, y, z, that.getTact());
|
||||
that.fill(x, y, z - 1, that.getTact());
|
||||
that.fill(x, y, z + 1, that.getTact());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityOilDuctSolid)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForOil(that, newTact));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(tileentity instanceof IOilAcceptor && newTact)
|
||||
{
|
||||
that.getList().add((IOilAcceptor)tileentity);
|
||||
}
|
||||
|
||||
if(!newTact)
|
||||
{
|
||||
int size = that.getList().size();
|
||||
if(size > 0)
|
||||
{
|
||||
int part = that.getSFill() / size;
|
||||
for(IOilAcceptor consume : that.getList())
|
||||
{
|
||||
if(consume.getFill() < consume.getMaxFill())
|
||||
{
|
||||
if(consume.getMaxFill() - consume.getFill() >= part)
|
||||
{
|
||||
that.setSFill(that.getSFill()-part);
|
||||
consume.setFill(consume.getFill() + part);
|
||||
} else {
|
||||
that.setSFill(that.getSFill() - (consume.getMaxFill() - consume.getFill()));
|
||||
consume.setFill(consume.getMaxFill());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
that.clearList();
|
||||
}
|
||||
}
|
||||
|
||||
public static void transmitGas(int x, int y, int z, boolean newTact, IGasSource that, World worldObj) {
|
||||
Block block = worldObj.getBlock(x, y, z);
|
||||
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
|
||||
|
||||
if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x + 1, y, z) == ModBlocks.machine_flare)
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(x + 1, y, z);
|
||||
}
|
||||
if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x - 1, y, z) == ModBlocks.machine_flare)
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(x - 1, y, z);
|
||||
}
|
||||
if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x, y, z + 1) == ModBlocks.machine_flare)
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(x, y, z + 1);
|
||||
}
|
||||
if(block == ModBlocks.dummy_port_flare && worldObj.getBlock(x, y, z - 1) == ModBlocks.machine_flare)
|
||||
{
|
||||
tileentity = worldObj.getTileEntity(x, y, z - 1);
|
||||
}
|
||||
|
||||
if(tileentity instanceof IGasDuct)
|
||||
{
|
||||
if(tileentity instanceof TileEntityGasDuct)
|
||||
{
|
||||
if(Library.checkGasUnionListForGas(((TileEntityGasDuct)tileentity).uoteab, that))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityGasDuct)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityGasDuct)tileentity).uoteab.get(i).source == that)
|
||||
{
|
||||
if(((TileEntityGasDuct)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityGasDuct)tileentity).uoteab.get(i).ticked = newTact;
|
||||
that.fillGas(x, y + 1, z, that.getTact());
|
||||
that.fillGas(x, y - 1, z, that.getTact());
|
||||
that.fillGas(x - 1, y, z, that.getTact());
|
||||
that.fillGas(x + 1, y, z, that.getTact());
|
||||
that.fillGas(x, y, z - 1, that.getTact());
|
||||
that.fillGas(x, y, z + 1, that.getTact());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityGasDuct)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForGas(that, newTact));
|
||||
}
|
||||
}
|
||||
if(tileentity instanceof TileEntityGasDuctSolid)
|
||||
{
|
||||
if(Library.checkGasUnionListForGas(((TileEntityGasDuctSolid)tileentity).uoteab, that))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityGasDuctSolid)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityGasDuctSolid)tileentity).uoteab.get(i).source == that)
|
||||
{
|
||||
if(((TileEntityGasDuctSolid)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityGasDuctSolid)tileentity).uoteab.get(i).ticked = newTact;
|
||||
that.fillGas(x, y + 1, z, that.getTact());
|
||||
that.fillGas(x, y - 1, z, that.getTact());
|
||||
that.fillGas(x - 1, y, z, that.getTact());
|
||||
that.fillGas(x + 1, y, z, that.getTact());
|
||||
that.fillGas(x, y, z - 1, that.getTact());
|
||||
that.fillGas(x, y, z + 1, that.getTact());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityGasDuctSolid)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForGas(that, newTact));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(tileentity instanceof IGasAcceptor && newTact)
|
||||
{
|
||||
that.getGasList().add((IGasAcceptor)tileentity);
|
||||
}
|
||||
|
||||
if(!newTact)
|
||||
{
|
||||
int size = that.getGasList().size();
|
||||
if(size > 0)
|
||||
{
|
||||
int part = that.getGasFill() / size;
|
||||
for(IGasAcceptor consume : that.getGasList())
|
||||
{
|
||||
if(consume.getGasFill() < consume.getMaxGasFill())
|
||||
{
|
||||
if(consume.getMaxGasFill() - consume.getGasFill() >= part)
|
||||
{
|
||||
that.setGasFill(that.getGasFill()-part);
|
||||
consume.setGasFill(consume.getGasFill() + part);
|
||||
} else {
|
||||
that.setGasFill(that.getGasFill() - (consume.getMaxGasFill() - consume.getGasFill()));
|
||||
consume.setGasFill(consume.getMaxGasFill());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
that.clearGasList();
|
||||
}
|
||||
}
|
||||
|
||||
public static void transmitFluid(int x, int y, int z, boolean newTact, IFluidSource that, World worldObj, FluidType type) {
|
||||
Block block = worldObj.getBlock(x, y, z);
|
||||
TileEntity tileentity = worldObj.getTileEntity(x, y, z);
|
||||
@ -1226,6 +1004,102 @@ public class Library {
|
||||
((TileEntityFluidDuct)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForFluids(that, newTact));
|
||||
}
|
||||
}
|
||||
if(tileentity instanceof TileEntityGasDuct && ((TileEntityGasDuct)tileentity).type.name().equals(type.name()))
|
||||
{
|
||||
if(Library.checkUnionListForFluids(((TileEntityGasDuct)tileentity).uoteab, that))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityGasDuct)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityGasDuct)tileentity).uoteab.get(i).source == that)
|
||||
{
|
||||
if(((TileEntityGasDuct)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityGasDuct)tileentity).uoteab.get(i).ticked = newTact;
|
||||
that.fillFluid(x, y + 1, z, that.getTact(), type);
|
||||
that.fillFluid(x, y - 1, z, that.getTact(), type);
|
||||
that.fillFluid(x - 1, y, z, that.getTact(), type);
|
||||
that.fillFluid(x + 1, y, z, that.getTact(), type);
|
||||
that.fillFluid(x, y, z - 1, that.getTact(), type);
|
||||
that.fillFluid(x, y, z + 1, that.getTact(), type);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityGasDuct)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForFluids(that, newTact));
|
||||
}
|
||||
}
|
||||
if(tileentity instanceof TileEntityOilDuct && ((TileEntityOilDuct)tileentity).type.name().equals(type.name()))
|
||||
{
|
||||
if(Library.checkUnionListForFluids(((TileEntityOilDuct)tileentity).uoteab, that))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityOilDuct)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityOilDuct)tileentity).uoteab.get(i).source == that)
|
||||
{
|
||||
if(((TileEntityOilDuct)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityOilDuct)tileentity).uoteab.get(i).ticked = newTact;
|
||||
that.fillFluid(x, y + 1, z, that.getTact(), type);
|
||||
that.fillFluid(x, y - 1, z, that.getTact(), type);
|
||||
that.fillFluid(x - 1, y, z, that.getTact(), type);
|
||||
that.fillFluid(x + 1, y, z, that.getTact(), type);
|
||||
that.fillFluid(x, y, z - 1, that.getTact(), type);
|
||||
that.fillFluid(x, y, z + 1, that.getTact(), type);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityOilDuct)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForFluids(that, newTact));
|
||||
}
|
||||
}
|
||||
if(tileentity instanceof TileEntityGasDuctSolid && ((TileEntityGasDuctSolid)tileentity).type.name().equals(type.name()))
|
||||
{
|
||||
if(Library.checkUnionListForFluids(((TileEntityGasDuctSolid)tileentity).uoteab, that))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityGasDuctSolid)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityGasDuctSolid)tileentity).uoteab.get(i).source == that)
|
||||
{
|
||||
if(((TileEntityGasDuctSolid)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityGasDuctSolid)tileentity).uoteab.get(i).ticked = newTact;
|
||||
that.fillFluid(x, y + 1, z, that.getTact(), type);
|
||||
that.fillFluid(x, y - 1, z, that.getTact(), type);
|
||||
that.fillFluid(x - 1, y, z, that.getTact(), type);
|
||||
that.fillFluid(x + 1, y, z, that.getTact(), type);
|
||||
that.fillFluid(x, y, z - 1, that.getTact(), type);
|
||||
that.fillFluid(x, y, z + 1, that.getTact(), type);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityGasDuctSolid)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForFluids(that, newTact));
|
||||
}
|
||||
}
|
||||
if(tileentity instanceof TileEntityOilDuctSolid && ((TileEntityOilDuctSolid)tileentity).type.name().equals(type.name()))
|
||||
{
|
||||
if(Library.checkUnionListForFluids(((TileEntityOilDuctSolid)tileentity).uoteab, that))
|
||||
{
|
||||
for(int i = 0; i < ((TileEntityOilDuctSolid)tileentity).uoteab.size(); i++)
|
||||
{
|
||||
if(((TileEntityOilDuctSolid)tileentity).uoteab.get(i).source == that)
|
||||
{
|
||||
if(((TileEntityOilDuctSolid)tileentity).uoteab.get(i).ticked != newTact)
|
||||
{
|
||||
((TileEntityOilDuctSolid)tileentity).uoteab.get(i).ticked = newTact;
|
||||
that.fillFluid(x, y + 1, z, that.getTact(), type);
|
||||
that.fillFluid(x, y - 1, z, that.getTact(), type);
|
||||
that.fillFluid(x - 1, y, z, that.getTact(), type);
|
||||
that.fillFluid(x + 1, y, z, that.getTact(), type);
|
||||
that.fillFluid(x, y, z - 1, that.getTact(), type);
|
||||
that.fillFluid(x, y, z + 1, that.getTact(), type);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((TileEntityOilDuctSolid)tileentity).uoteab.add(new UnionOfTileEntitiesAndBooleansForFluids(that, newTact));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(tileentity instanceof IFluidAcceptor && newTact && !(tileentity instanceof TileEntityMachineFluidTank && ((TileEntityMachineFluidTank)tileentity).dna()))
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.26 BETA (Astatine-Actinium-X02)";
|
||||
public static final String VERSION = "1.0.26 BETA (Bromine-Lanthanium-X02)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X-Y-Z)
|
||||
//V -> next release version
|
||||
|
||||
@ -1,22 +1,29 @@
|
||||
package com.hbm.tileentity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForGas;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.interfaces.IGasDuct;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEFluidPipePacket;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityGasDuct extends TileEntity implements IGasDuct {
|
||||
public class TileEntityGasDuct extends TileEntity implements IFluidDuct {
|
||||
|
||||
public ForgeDirection[] connections = new ForgeDirection[6];
|
||||
|
||||
public List<UnionOfTileEntitiesAndBooleansForGas> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForGas>();
|
||||
public FluidType type = FluidType.GAS;
|
||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||
|
||||
public TileEntityGasDuct() {
|
||||
|
||||
@ -24,28 +31,45 @@ public class TileEntityGasDuct extends TileEntity implements IGasDuct {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAll(new TEFluidPipePacket(xCoord, yCoord, zCoord, type));
|
||||
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
public void updateConnections() {
|
||||
if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord + 1, zCoord)) connections[0] = ForgeDirection.UP;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord + 1, zCoord, type)) connections[0] = ForgeDirection.UP;
|
||||
else connections[0] = null;
|
||||
|
||||
if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord - 1, zCoord)) connections[1] = ForgeDirection.DOWN;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord - 1, zCoord, type)) connections[1] = ForgeDirection.DOWN;
|
||||
else connections[1] = null;
|
||||
|
||||
if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord, zCoord - 1)) connections[2] = ForgeDirection.NORTH;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord - 1, type)) connections[2] = ForgeDirection.NORTH;
|
||||
else connections[2] = null;
|
||||
|
||||
if(Library.checkGasConnectables(this.worldObj, xCoord + 1, yCoord, zCoord)) connections[3] = ForgeDirection.EAST;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord + 1, yCoord, zCoord, type)) connections[3] = ForgeDirection.EAST;
|
||||
else connections[3] = null;
|
||||
|
||||
if(Library.checkGasConnectables(this.worldObj, xCoord, yCoord, zCoord + 1)) connections[4] = ForgeDirection.SOUTH;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord + 1, type)) connections[4] = ForgeDirection.SOUTH;
|
||||
else connections[4] = null;
|
||||
|
||||
if(Library.checkGasConnectables(this.worldObj, xCoord - 1, yCoord, zCoord)) connections[5] = ForgeDirection.WEST;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord - 1, yCoord, zCoord, type)) connections[5] = ForgeDirection.WEST;
|
||||
else connections[5] = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.readFromNBT(nbt);
|
||||
type = FluidType.GAS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.writeToNBT(nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@ -3,12 +3,16 @@ package com.hbm.tileentity;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForGas;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.interfaces.IGasDuct;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityGasDuctSolid extends TileEntity implements IGasDuct {
|
||||
public class TileEntityGasDuctSolid extends TileEntity implements IFluidDuct {
|
||||
|
||||
public List<UnionOfTileEntitiesAndBooleansForGas> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForGas>();
|
||||
public FluidType type = FluidType.GAS;
|
||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||
|
||||
}
|
||||
|
||||
@ -466,10 +466,33 @@ public class TileEntityMachinePumpjack extends TileEntity implements ISidedInven
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
fillFluid(this.xCoord, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
|
||||
int i = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
|
||||
if(i == 5) {
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
fillFluid(this.xCoord - 3, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
fillFluid(this.xCoord - 3, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
}
|
||||
if(i == 3) {
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
}
|
||||
if(i == 4) {
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
fillFluid(this.xCoord + 3, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
fillFluid(this.xCoord + 3, this.yCoord, this.zCoord - 2, getTact(), type);
|
||||
}
|
||||
if(i == 2) {
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
fillFluid(this.xCoord + 2, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
fillFluid(this.xCoord - 2, this.yCoord, this.zCoord + 2, getTact(), type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,22 +1,29 @@
|
||||
package com.hbm.tileentity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.interfaces.IOilDuct;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.packet.TEFluidPipePacket;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityOilDuct extends TileEntity implements IOilDuct {
|
||||
public class TileEntityOilDuct extends TileEntity implements IFluidDuct {
|
||||
|
||||
public ForgeDirection[] connections = new ForgeDirection[6];
|
||||
|
||||
public List<UnionOfTileEntitiesAndBooleansForOil> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForOil>();
|
||||
public FluidType type = FluidType.OIL;
|
||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||
|
||||
public TileEntityOilDuct() {
|
||||
|
||||
@ -24,28 +31,45 @@ public class TileEntityOilDuct extends TileEntity implements IOilDuct {
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
PacketDispatcher.wrapper.sendToAll(new TEFluidPipePacket(xCoord, yCoord, zCoord, type));
|
||||
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
public void updateConnections() {
|
||||
if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord + 1, zCoord)) connections[0] = ForgeDirection.UP;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord + 1, zCoord, type)) connections[0] = ForgeDirection.UP;
|
||||
else connections[0] = null;
|
||||
|
||||
if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord - 1, zCoord)) connections[1] = ForgeDirection.DOWN;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord - 1, zCoord, type)) connections[1] = ForgeDirection.DOWN;
|
||||
else connections[1] = null;
|
||||
|
||||
if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord, zCoord - 1)) connections[2] = ForgeDirection.NORTH;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord - 1, type)) connections[2] = ForgeDirection.NORTH;
|
||||
else connections[2] = null;
|
||||
|
||||
if(Library.checkOilConnectables(this.worldObj, xCoord + 1, yCoord, zCoord)) connections[3] = ForgeDirection.EAST;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord + 1, yCoord, zCoord, type)) connections[3] = ForgeDirection.EAST;
|
||||
else connections[3] = null;
|
||||
|
||||
if(Library.checkOilConnectables(this.worldObj, xCoord, yCoord, zCoord + 1)) connections[4] = ForgeDirection.SOUTH;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord, yCoord, zCoord + 1, type)) connections[4] = ForgeDirection.SOUTH;
|
||||
else connections[4] = null;
|
||||
|
||||
if(Library.checkOilConnectables(this.worldObj, xCoord - 1, yCoord, zCoord)) connections[5] = ForgeDirection.WEST;
|
||||
if(Library.checkFluidConnectables(this.worldObj, xCoord - 1, yCoord, zCoord, type)) connections[5] = ForgeDirection.WEST;
|
||||
else connections[5] = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.readFromNBT(nbt);
|
||||
type = FluidType.OIL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.writeToNBT(nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@ -3,13 +3,17 @@ package com.hbm.tileentity;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForFluids;
|
||||
import com.hbm.calc.UnionOfTileEntitiesAndBooleansForOil;
|
||||
import com.hbm.handler.FluidTypeHandler.FluidType;
|
||||
import com.hbm.interfaces.IFluidDuct;
|
||||
import com.hbm.interfaces.IOilDuct;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileEntityOilDuctSolid extends TileEntity implements IOilDuct {
|
||||
|
||||
public List<UnionOfTileEntitiesAndBooleansForOil> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForOil>();
|
||||
public class TileEntityOilDuctSolid extends TileEntity implements IFluidDuct {
|
||||
|
||||
public FluidType type = FluidType.OIL;
|
||||
public List<UnionOfTileEntitiesAndBooleansForFluids> uoteab = new ArrayList<UnionOfTileEntitiesAndBooleansForFluids>();
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user