more fixes

This commit is contained in:
Progwml6 committed 2014-01-09 04:08:38 -05:00
1 parent eba66e0182
commit fb04e8eb08
55 files changed
+1446 -1442

No files matched your search

@@ -3,10 +3,12 @@ package tconstruct.library.component;
import java.util.*;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.*;
import net.minecraft.tileentity.TileEntity;
import tconstruct.TConstruct;
import mantle.world.*;
import mantle.blocks.BlockUtils;
import mantle.blocks.iface.IFacingLogic;
import mantle.blocks.iface.IMasterLogic;
import mantle.blocks.iface.IServantLogic;
@@ -153,7 +155,7 @@ public class TankLayerScan extends LogicComponent
for (CoordTuple coord : blockCoords)
{
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
TileEntity servant = world.func_147438_o(coord.x, coord.y, coord.z);
if (servant instanceof IServantLogic)
((IServantLogic) servant).verifyMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
}
@@ -191,8 +193,8 @@ public class TankLayerScan extends LogicComponent
protected boolean checkAir (int x, int y, int z)
{
Block block = Block.blocksList[world.getBlockId(x, y, z)];
if (block == null || block.isAirBlock(world, x, y, z))// || block == TContent.tankAir)
Block block = world.func_147439_a(x, y, z);
if (block == null || block == Blocks.air)// || block == TContent.tankAir)
return true;
return false;
@@ -200,14 +202,14 @@ public class TankLayerScan extends LogicComponent
protected boolean checkServant (int x, int y, int z)
{
Block block = Block.blocksList[world.getBlockId(x, y, z)];
if (block == null || block.isAirBlock(world, x, y, z) || !isValidBlock(x, y, z))
Block block = world.func_147439_a(x, y, z);
if (block == null || block == Blocks.air || !isValidBlock(x, y, z))
return false;
if (!block.hasTileEntity(world.getBlockMetadata(x, y, z)))
return false;
TileEntity be = world.getBlockTileEntity(x, y, z);
TileEntity be = world.func_147438_o(x, y, z);
if (be instanceof IServantLogic)
return ((IServantLogic) be).setPotentialMaster(this.imaster, this.world, x, y, z);
@@ -245,7 +247,7 @@ public class TankLayerScan extends LogicComponent
protected boolean isValidBlock (int x, int y, int z)
{
Block block = Block.blocksList[world.getBlockId(x, y, z)];
Block block = world.func_147439_a(x, y, z);
if (block != null)
{
for (int i = 0; i < scanBlocks.length; i++)
@@ -415,7 +417,7 @@ public class TankLayerScan extends LogicComponent
int height = -1;
for (CoordTuple coord : blockCoords)
{
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
TileEntity servant = world.func_147438_o(coord.x, coord.y, coord.z);
boolean canPass = false;
if (servant instanceof IServantLogic)
{
@@ -455,7 +457,7 @@ public class TankLayerScan extends LogicComponent
completeStructure = false;
for (CoordTuple coord : blockCoords)
{
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
TileEntity servant = world.func_147438_o(coord.x, coord.y, coord.z);
if (servant instanceof IServantLogic)
((IServantLogic) servant).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
}
@@ -469,7 +471,7 @@ public class TankLayerScan extends LogicComponent
if (coord.y < height)
continue;
TileEntity servant = world.getBlockTileEntity(coord.x, coord.y, coord.z);
TileEntity servant = world.func_147438_o(coord.x, coord.y, coord.z);
if (servant instanceof IServantLogic)
((IServantLogic) servant).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);
}
@@ -482,7 +484,7 @@ public class TankLayerScan extends LogicComponent
while (i.hasNext())
{
CoordTuple coord = (CoordTuple) i.next();
TileEntity te = world.getBlockTileEntity(coord.x, coord.y, coord.z);
TileEntity te = world.func_147438_o(coord.x, coord.y, coord.z);
if (te != null && te instanceof IServantLogic)
{
((IServantLogic) te).invalidateMaster(imaster, world, master.field_145851_c, master.field_145848_d, master.field_145849_e);