mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
more fixes
This commit is contained in:
1 parent
eba66e0182
commit
fb04e8eb08
55 files changed
+1446
-1442
No files matched your search
@@ -512,11 +512,11 @@ public class TConstructRegistry
|
||||
* 5: Has rotational TileEntity data
|
||||
* 6: Custom placement logic
|
||||
*/
|
||||
public static Block[] drawbridgeState = new Block[Block.blocksList.length];
|
||||
public static Block[] drawbridgeState = new Block[Integer.MAX_VALUE];
|
||||
/** Blocks that are interchangable with each other. Ex: Still and flowing water */
|
||||
public static int[] interchangableBlockMapping = new int[Block.blocksList.length];
|
||||
public static int[] interchangableBlockMapping = new int[Integer.MAX_VALUE];
|
||||
/** Blocks that place items, and vice versa */
|
||||
public static int[] blockToItemMapping = new int[Item.itemsList.length];
|
||||
public static int[] blockToItemMapping = new int[Integer.MAX_VALUE];
|
||||
|
||||
static void initializeDrawbridgeState ()
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -58,9 +58,9 @@ public class Detailing
|
||||
toolTag.setInteger("RenderAccessory", 2);
|
||||
toolTag.setInteger("Damage", 0);
|
||||
toolTag.setInteger("TotalDurability", 100);
|
||||
compound.setCompoundTag("InfiTool", toolTag);
|
||||
compound.setTag("InfiTool", toolTag);
|
||||
toolstack.setTagCompound(compound);
|
||||
addShapelessToolRecipe(new ItemStack(details.outputID, 1, details.outputMeta), toolstack, new ItemStack(details.inputID, 1, details.inputMeta));
|
||||
addShapelessToolRecipe(new ItemStack(details.output, 1, details.outputMeta), toolstack, new ItemStack(details.input, 1, details.inputMeta));
|
||||
}
|
||||
|
||||
public void addShapelessToolRecipe (ItemStack par1ItemStack, Object... par2ArrayOfObj)
|
||||
|
||||
Reference in new issue
Block a user