bunch more random stuff fixed

This commit is contained in:
Progwml6 committed 2014-01-07 15:07:07 -05:00
1 parent f52b2f6f08
commit 9814eadaea
24 files changed
+132 -138

No files matched your search

@@ -15,6 +15,7 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
@@ -54,7 +55,7 @@ public class BlockLandmine extends BlockContainer
@Override
public int getLightValue (IBlockAccess world, int x, int y, int z)
{
if (world.getBlockId(x, y, z) == this.blockID && world.getBlockTileEntity(x, y, z) instanceof TileEntityLandmine)
if (world.func_147439_a(x, y, z) == (Block) this && world.getBlockTileEntity(x, y, z) instanceof TileEntityLandmine)
{
TileEntityLandmine te = (TileEntityLandmine) world.getBlockTileEntity(x, y, z);
@@ -123,7 +124,7 @@ public class BlockLandmine extends BlockContainer
@Override
public void registerIcons (IIconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon("tinker:Landmine");
this.field_149761_L = par1IconRegister.registerIcon("tinker:Landmine");
}
@Override
@@ -192,7 +193,7 @@ public class BlockLandmine extends BlockContainer
}
@Override
public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List)
public void getSubBlocks (Item par1, CreativeTabs par2CreativeTabs, List par3List)
{
par3List.add(new ItemStack(par1, 1, 0));
par3List.add(new ItemStack(par1, 1, 1));
@@ -210,16 +211,16 @@ public class BlockLandmine extends BlockContainer
public boolean canPlaceBlockOnSide (World par1World, int par2, int par3, int par4, int par5)
{
ForgeDirection dir = ForgeDirection.getOrientation(par5);
return (dir == DOWN && par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN)) || (dir == UP && par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP))
|| (dir == NORTH && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH)) || (dir == SOUTH && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH))
|| (dir == WEST && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST)) || (dir == EAST && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST));
return (dir == DOWN && par1World.isSideSolid(par2, par3 + 1, par4, DOWN)) || (dir == UP && par1World.isSideSolid(par2, par3 - 1, par4, UP))
|| (dir == NORTH && par1World.isSideSolid(par2, par3, par4 + 1, NORTH)) || (dir == SOUTH && par1World.isSideSolid(par2, par3, par4 - 1, SOUTH))
|| (dir == WEST && par1World.isSideSolid(par2 + 1, par3, par4, WEST)) || (dir == EAST && par1World.isSideSolid(par2 - 1, par3, par4, EAST));
}
@Override
public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4)
{
return par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST) || par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST) || par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH)
|| par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH) || par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP) || par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN);
return par1World.isSideSolid(par2 - 1, par3, par4, EAST) || par1World.isSideSolid(par2 + 1, par3, par4, WEST) || par1World.isSideSolid(par2, par3, par4 - 1, SOUTH)
|| par1World.isSideSolid(par2, par3, par4 + 1, NORTH) || par1World.isSideSolid(par2, par3 - 1, par4, UP) || par1World.isSideSolid(par2, par3 + 1, par4, DOWN);
}
@Override
@@ -229,32 +230,32 @@ public class BlockLandmine extends BlockContainer
int k1 = par9 & 7;
byte b0 = -1;
if (par5 == 0 && par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN))
if (par5 == 0 && par1World.isSideSolid(par2, par3 + 1, par4, DOWN))
{
b0 = 0;
}
if (par5 == 1 && par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP))
if (par5 == 1 && par1World.isSideSolid(par2, par3 - 1, par4, UP))
{
b0 = 5;
}
if (par5 == 2 && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH))
if (par5 == 2 && par1World.isSideSolid(par2, par3, par4 + 1, NORTH))
{
b0 = 4;
}
if (par5 == 3 && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH))
if (par5 == 3 && par1World.isSideSolid(par2, par3, par4 - 1, SOUTH))
{
b0 = 3;
}
if (par5 == 4 && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST))
if (par5 == 4 && par1World.isSideSolid(par2 + 1, par3, par4, WEST))
{
b0 = 2;
}
if (par5 == 5 && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST))
if (par5 == 5 && par1World.isSideSolid(par2 - 1, par3, par4, EAST))
{
b0 = 1;
}
@@ -334,42 +335,42 @@ public class BlockLandmine extends BlockContainer
int i1 = par1World.getBlockMetadata(par2, par3, par4) & 7;
boolean flag = false;
if (!par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST) && i1 == 1)
if (!par1World.isSideSolid(par2 - 1, par3, par4, EAST) && i1 == 1)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST) && i1 == 2)
if (!par1World.isSideSolid(par2 + 1, par3, par4, WEST) && i1 == 2)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH) && i1 == 3)
if (!par1World.isSideSolid(par2, par3, par4 - 1, SOUTH) && i1 == 3)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH) && i1 == 4)
if (!par1World.isSideSolid(par2, par3, par4 + 1, NORTH) && i1 == 4)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP) && i1 == 5)
if (!par1World.isSideSolid(par2, par3 - 1, par4, UP) && i1 == 5)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2, par3 - 1, par4, UP) && i1 == 6)
if (!par1World.isSideSolid(par2, par3 - 1, par4, UP) && i1 == 6)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN) && i1 == 0)
if (!par1World.isSideSolid(par2, par3 + 1, par4, DOWN) && i1 == 0)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2, par3 + 1, par4, DOWN) && i1 == 7)
if (!par1World.isSideSolid(par2, par3 + 1, par4, DOWN) && i1 == 7)
{
flag = true;
}
@@ -587,8 +587,8 @@ public class GlassBlockConnected extends MantleBlock
@Override
public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
int i1 = par1IBlockAccess.getBlockId(par2, par3, par4);
return i1 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
Block b = par1IBlockAccess.func_147439_a(par2, par3, par4);
return b == (Block) this ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
}
@Override
+17 -18
View File
@@ -73,8 +73,8 @@ public class StoneTorch extends MantleBlock
}
else
{
int l = par1World.getBlockId(par2, par3, par4);
return (Block.blocksList[l] != null && Block.blocksList[l].canPlaceTorchOnTop(par1World, par2, par3, par4));
Block b = par1World.func_147439_a(par2, par3, par4);
return (b != null && b.canPlaceTorchOnTop(par1World, par2, par3, par4));
}
}
@@ -83,8 +83,8 @@ public class StoneTorch extends MantleBlock
*/
public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4)
{
return par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST, true) || par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST, true)
|| par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH, true) || par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH, true)
return par1World.isSideSolid(par2 - 1, par3, par4, EAST, true) || par1World.isSideSolid(par2 + 1, par3, par4, WEST, true)
|| par1World.isSideSolid(par2, par3, par4 - 1, SOUTH, true) || par1World.isSideSolid(par2, par3, par4 + 1, NORTH, true)
|| canPlaceTorchOn(par1World, par2, par3 - 1, par4);
}
@@ -101,19 +101,19 @@ public class StoneTorch extends MantleBlock
{
j1 = 5;
}
else if (par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH, true))
else if (par1World.isSideSolid(par2, par3, par4 + 1, NORTH, true))
{
j1 = 4;
}
else if (par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH, true))
else if (par1World.isSideSolid(par2, par3, par4 - 1, SOUTH, true))
{
j1 = 3;
}
else if (par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST, true))
else if (par1World.isSideSolid(par2 + 1, par3, par4, WEST, true))
{
j1 = 2;
}
else if (par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST, true))
else if (par1World.isSideSolid(par2 - 1, par3, par4, EAST, true))
{
j1 = 1;
}
@@ -124,22 +124,22 @@ public class StoneTorch extends MantleBlock
j1 = 5;
}
if (par5 == 2 && par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH, true))
if (par5 == 2 && par1World.isSideSolid(par2, par3, par4 + 1, NORTH, true))
{
j1 = 4;
}
if (par5 == 3 && par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH, true))
if (par5 == 3 && par1World.isSideSolid(par2, par3, par4 - 1, SOUTH, true))
{
j1 = 3;
}
if (par5 == 4 && par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST, true))
if (par5 == 4 && par1World.isSideSolid(par2 + 1, par3, par4, WEST, true))
{
j1 = 2;
}
if (par5 == 5 && par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST, true))
if (par5 == 5 && par1World.isSideSolid(par2 - 1, par3, par4, EAST, true))
{
j1 = 1;
}
@@ -169,22 +169,22 @@ public class StoneTorch extends MantleBlock
int i1 = par1World.getBlockMetadata(par2, par3, par4);
boolean flag = false;
if (!par1World.isBlockSolidOnSide(par2 - 1, par3, par4, EAST, true) && i1 == 1)
if (!par1World.isSideSolid(par2 - 1, par3, par4, EAST, true) && i1 == 1)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2 + 1, par3, par4, WEST, true) && i1 == 2)
if (!par1World.isSideSolid(par2 + 1, par3, par4, WEST, true) && i1 == 2)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2, par3, par4 - 1, SOUTH, true) && i1 == 3)
if (!par1World.isSideSolid(par2, par3, par4 - 1, SOUTH, true) && i1 == 3)
{
flag = true;
}
if (!par1World.isBlockSolidOnSide(par2, par3, par4 + 1, NORTH, true) && i1 == 4)
if (!par1World.isSideSolid(par2, par3, par4 + 1, NORTH, true) && i1 == 4)
{
flag = true;
}
@@ -197,7 +197,6 @@ public class StoneTorch extends MantleBlock
if (flag)
{
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlockToAir(par2, par3, par4);
return true;
}
else
@@ -219,7 +218,7 @@ public class StoneTorch extends MantleBlock
{
if (!this.canPlaceBlockAt(par1World, par2, par3, par4))
{
if (par1World.getBlockId(par2, par3, par4) == this.blockID)
if (par1World.func_147439_a(par2, par3, par4) == (Block) this)
{
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
par1World.setBlockToAir(par2, par3, par4);
@@ -244,7 +244,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
return 2400;
}
if (block.blockMaterial == Material.wood)
if (block.func_149688_o() == Material.wood)
{
return 300;
}
@@ -222,7 +222,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
return 1200;
}
if (block.blockMaterial == Material.wood)
if (block.func_149688_o() == Material.wood)
{
return 300;
}
@@ -13,6 +13,7 @@ import net.minecraft.entity.passive.EntityHorse;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -711,42 +712,37 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
public void alignInitialPlacement (int x, int y, int z)
{
int northID = this.field_145850_b.getBlockId(x, y, z + 1);
int southID = field_145850_b.getBlockId(x, y, z - 1);
int eastID = field_145850_b.getBlockId(x + 1, y, z);
int westID = field_145850_b.getBlockId(x - 1, y, z);
Block northBlock = field_145850_b.func_147439_a(x, y, z + 1);
Block southBlock = field_145850_b.func_147439_a(x, y, z - 1);
Block eastBlock = field_145850_b.func_147439_a(x + 1, y, z);
Block westBlock = field_145850_b.func_147439_a(x - 1, y, z);
Block northBlock = Block.blocksList[northID];
Block southBlock = Block.blocksList[southID];
Block eastBlock = Block.blocksList[eastID];
Block westBlock = Block.blocksList[westID];
if ((northBlock == null || northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
if ((northBlock == null || northBlock == Blocks.air) && (southBlock == null || southBlock == Blocks.air)
&& (eastBlock == null || eastBlock == Blocks.air) && (westBlock == null || westBlock == Blocks.air))
{
checkValidStructure(x, y, z);
}
else if ((northBlock != null && !northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
else if ((northBlock != null && !(northBlock == Blocks.air) && (southBlock == null || southBlock == Blocks.air)
&& (eastBlock == null || eastBlock == Blocks.air) && (westBlock == null || westBlock == Blocks.air)))
{
checkValidStructure(x, y, z - 1);
}
else if ((northBlock == null || northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock != null && !southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
else if ((northBlock == null || northBlock == Blocks.air) && (southBlock != null && !(southBlock == Blocks.air))
&& (eastBlock == null || eastBlock == Blocks.air) && (westBlock == null || westBlock == Blocks.air))
{
checkValidStructure(x, y, z + 1);
}
else if ((northBlock == null || northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock != null && !eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock == null || westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
else if ((northBlock == null || northBlock == Blocks.air) && (southBlock == null || southBlock == Blocks.air)
&& (eastBlock != null && !(eastBlock == Blocks.air)) && (westBlock == null || westBlock == Blocks.air))
{
checkValidStructure(x - 1, y, z);
}
else if ((northBlock == null || northBlock.isAirBlock(field_145850_b, x, y, z + 1)) && (southBlock == null || southBlock.isAirBlock(field_145850_b, x, y, z - 1))
&& (eastBlock == null || eastBlock.isAirBlock(field_145850_b, x + 1, y, z)) && (westBlock != null && !westBlock.isAirBlock(field_145850_b, x - 1, y, z)))
else if ((northBlock == null || northBlock == Blocks.air) && (southBlock == null || southBlock == Blocks.air)
&& (eastBlock == null || eastBlock == Blocks.air) && (westBlock != null && !(westBlock == Blocks.air)))
{
checkValidStructure(x + 1, y, z);
}
@@ -796,8 +792,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
block = Block.blocksList[field_145850_b.getBlockId(xPos, y, zPos)];
if (block != null && !block.isAirBlock(field_145850_b, xPos, y, zPos))
block = field_145850_b.func_147439_a(xPos, y, zPos);
if (block != null && block != Blocks.air)
return false;
}
}
@@ -829,8 +825,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
Block block = Block.blocksList[field_145850_b.getBlockId(xPos, y, zPos)];
if (block != null && !block.isAirBlock(field_145850_b, xPos, y, zPos))
Block block = field_145850_b.func_147439_a(xPos, y, zPos);
if (block != null && !(block == Blocks.air))
return count;
}
}
@@ -863,11 +859,10 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
int blockID = field_145850_b.getBlockId(xPos, y, zPos);
Block block = Block.blocksList[blockID];
if (block != null && !block.isAirBlock(field_145850_b, xPos, y, zPos))
Block block = field_145850_b.func_147439_a(xPos, y, zPos);
if (block != null && block != Blocks.air)
{
if (validBlockID(blockID))
if (validBlock(block))
return validateBottom(x, y, z, count);
else
return count;
@@ -902,7 +897,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
if (validBlockID(field_145850_b.getBlockId(xPos, y, zPos)) && (field_145850_b.getBlockMetadata(xPos, y, zPos) >= 2))
if (validBlock(field_145850_b.func_147439_a(xPos, y, zPos)) && (field_145850_b.getBlockMetadata(xPos, y, zPos) >= 2))
bottomBricks++;
}
}
@@ -921,8 +916,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
int checkBricks (int x, int y, int z)
{
int tempBricks = 0;
int blockID = field_145850_b.getBlockId(x, y, z);
if (validBlockID(blockID) || validTankID(blockID))
Block block = field_145850_b.func_147439_a(x, y, z);
if (validBlock(block) || validTankID(block))
{
TileEntity te = field_145850_b.getBlockTileEntity(x, y, z);
if (te == this)
@@ -60,7 +60,7 @@ public class ToolStationLogic extends InventoryLogic implements ISidedInventory
buildTool(toolName);
if (this.getWorld() != null)
{
this.blockMetadata = this.getWorld().getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
this.field_145847_g = this.getWorld().getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
this.getWorld().markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this);
}
}