mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 11:59:14 +00:00
moar fixes
This commit is contained in:
1 parent
3cc541e872
commit
f52b2f6f08
21 files changed
+724
-722
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -24,8 +25,8 @@ public class GlassBlock extends TConstructBlock
|
||||
@SideOnly(Side.CLIENT)
|
||||
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 i1 = par1IBlockAccess.func_147439_a(par2, par3, par4);
|
||||
return i1 == (Block) this ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -65,9 +65,9 @@ public class GlassBlockConnected extends MantleBlock
|
||||
* @param par6 Metadata of the block this block is trying to connect to
|
||||
* @return true if should connect
|
||||
*/
|
||||
public boolean shouldConnectToBlock (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5, int par6)
|
||||
public boolean shouldConnectToBlock (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, Block par5, int par6)
|
||||
{
|
||||
return par5 == this.blockID;
|
||||
return par5 == (Block) this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -667,9 +667,9 @@ public class GlassPaneConnected extends GlassBlockConnected
|
||||
return this.theIcon;
|
||||
}
|
||||
|
||||
public final boolean canThisPaneConnectToThisBlockID (int par1)
|
||||
public final boolean canThisPaneConnectToThisBlock (Block b)
|
||||
{
|
||||
return Block.opaqueCubeLookup[par1] || par1 == this.blockID || par1 == Blocks.glass.blockID;
|
||||
return Block.opaqueCubeLookup[b] || b == (Block) this || b == Blocks.glass;
|
||||
}
|
||||
|
||||
public void registerIcons (IIconRegister par1IconRegister)
|
||||
|
||||
@@ -92,8 +92,8 @@ public class LavaTankBlock extends BlockContainer
|
||||
{
|
||||
//if (side == 0 && world.getBlockMetadata(x, y, z) == 0)
|
||||
//return super.shouldSideBeRendered(world, x, y, z, side);
|
||||
int bID = world.getBlockId(x, y, z);
|
||||
return bID == this.blockID ? false : super.shouldSideBeRendered(world, x, y, z, side);
|
||||
Block b = world.func_147439_a(x, y, z);
|
||||
return b == (Block)this ? false : super.shouldSideBeRendered(world, x, y, z, side);
|
||||
//return true;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ public class LavaTankBlock extends BlockContainer
|
||||
{
|
||||
player.addExhaustion(0.025F);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
ItemStack stack = new ItemStack(this.blockID, 1, meta);
|
||||
ItemStack stack = new ItemStack(this, 1, meta);
|
||||
LavaTankLogic logic = (LavaTankLogic) world.getBlockTileEntity(x, y, z);
|
||||
FluidStack liquid = logic.tank.getFluid();
|
||||
if (liquid != null)
|
||||
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
@@ -206,8 +207,9 @@ public class SearedBlock extends InventoryBlock
|
||||
return textureNames;
|
||||
}
|
||||
|
||||
//TODO getIcon
|
||||
@Override
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
if (meta == 0)
|
||||
return icons[getTextureIndex(side)];
|
||||
@@ -246,7 +248,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Block b, CreativeTabs tab, List list)
|
||||
public void func_149666_a (Item b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < 3; iter++)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ public class StoneLadder extends BlockLadder
|
||||
{
|
||||
super();
|
||||
this.setUnlocalizedName("decoration.stoneladder");
|
||||
this.setCreativeTab(CreativeTabs.tabDecorations);
|
||||
this.func_149647_a(CreativeTabs.tabDecorations);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Iterator;
|
||||
import mantle.blocks.iface.IServantLogic;
|
||||
import mantle.world.CoordTuple;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagIntArray;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
@@ -32,8 +33,8 @@ public class SmelteryScan extends TankLayerScan
|
||||
|
||||
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 == TRepo.tankAir)
|
||||
Block block = world.func_147439_a(x, y, z);
|
||||
if (block == null || block == Blocks.air || block == TRepo.tankAir)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -42,8 +43,8 @@ public class SmelteryScan extends TankLayerScan
|
||||
@Override
|
||||
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 || world.func_147439_a( x, y, z) == Blocks.air || !isValidBlock(x, y, z))
|
||||
return false;
|
||||
|
||||
if (!block.hasTileEntity(world.getBlockMetadata(x, y, z)))
|
||||
@@ -71,9 +72,9 @@ public class SmelteryScan extends TankLayerScan
|
||||
{
|
||||
for (CoordTuple coord : airCoords)
|
||||
{
|
||||
if (world.getBlockId(coord.x, coord.y, coord.z) != TRepo.tankAir.blockID)
|
||||
if (world.func_147439_a(coord.x, coord.y, coord.z) != TRepo.tankAir)
|
||||
{
|
||||
world.setBlock(coord.x, coord.y, coord.z, TRepo.tankAir.blockID);
|
||||
world.setBlock(coord.x, coord.y, coord.z, TRepo.tankAir);
|
||||
IServantLogic servant = (IServantLogic) world.getBlockTileEntity(coord.x, coord.y, coord.z);
|
||||
servant.verifyMaster(imaster, world, master.xCoord, master.yCoord, master.zCoord);
|
||||
}
|
||||
|
||||
@@ -206,7 +206,6 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
}
|
||||
else
|
||||
{
|
||||
int i = stack.getItem().itemID;
|
||||
Item item = stack.getItem();
|
||||
|
||||
if (stack.getItem() instanceof ItemBlock && Block.blocksList[i] != null)
|
||||
@@ -240,15 +239,15 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
|
||||
return 200;
|
||||
if (item instanceof ItemHoe && ((ItemHoe) item).getMaterialName().equals("WOOD"))
|
||||
return 200;
|
||||
if (i == Items.stick.itemID)
|
||||
if (item == Items.stick)
|
||||
return 100;
|
||||
if (i == Items.coal.itemID)
|
||||
if (item == Items.coal)
|
||||
return 1600;
|
||||
if (i == Items.bucketLava.itemID)
|
||||
if (item == Items.lava_bucket)
|
||||
return 20000;
|
||||
if (i == Blocks.sapling.blockID)
|
||||
if (item == new ItemStack(Blocks.sapling).getItem())
|
||||
return 100;
|
||||
if (i == Items.blaze_rod.itemID)
|
||||
if (item == Items.blaze_rod)
|
||||
return 2400;
|
||||
return GameRegistry.getFuelValue(stack);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
@@ -79,7 +80,7 @@ public class SlimeGrass extends MantleBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Block b, CreativeTabs tab, List list)
|
||||
public void getSubBlocks (Item b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < 1; iter++)
|
||||
{
|
||||
@@ -96,7 +97,7 @@ public class SlimeGrass extends MantleBlock
|
||||
|
||||
public void onPlantGrow (World world, int x, int y, int z, int sourceX, int sourceY, int sourceZ)
|
||||
{
|
||||
world.setBlock(x, y, z, TRepo.craftedSoil.blockID, 5, 3);
|
||||
world.setBlock(x, y, z, TRepo.craftedSoil, 5, 3);
|
||||
}
|
||||
|
||||
public void updateTick (World par1World, int par2, int par3, int par4, Random par5Random)
|
||||
@@ -105,7 +106,7 @@ public class SlimeGrass extends MantleBlock
|
||||
{
|
||||
if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && par1World.getBlockLightOpacity(par2, par3 + 1, par4) > 2)
|
||||
{
|
||||
par1World.setBlock(par2, par3, par4, TRepo.craftedSoil.blockID, 5, 3);
|
||||
par1World.setBlock(par2, par3, par4, TRepo.craftedSoil, 5, 3);
|
||||
}
|
||||
else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9)
|
||||
{
|
||||
@@ -114,21 +115,21 @@ public class SlimeGrass extends MantleBlock
|
||||
int posX = par2 + par5Random.nextInt(3) - 1;
|
||||
int posY = par3 + par5Random.nextInt(5) - 3;
|
||||
int posZ = par4 + par5Random.nextInt(3) - 1;
|
||||
int l1 = par1World.getBlockId(posX, posY + 1, posZ);
|
||||
Block l1 = par1World.func_147439_a(posX, posY + 1, posZ);
|
||||
|
||||
if (par1World.getBlockLightValue(posX, posY + 1, posZ) >= 4 && par1World.getBlockLightOpacity(posX, posY + 1, posZ) <= 2)
|
||||
{
|
||||
int blockID = par1World.getBlockId(posX, posY, posZ);
|
||||
if (blockID == Blocks.dirt.blockID)
|
||||
Block block = par1World.func_147439_a(posX, posY, posZ);
|
||||
if (block == Blocks.dirt)
|
||||
{
|
||||
par1World.setBlock(posX, posY, posZ, this.blockID, 1, 3);
|
||||
par1World.setBlock(posX, posY, posZ,(Block) this, 1, 3);
|
||||
return;
|
||||
}
|
||||
int blockMeta = par1World.getBlockMetadata(posX, posY, posZ);
|
||||
if (blockID == TRepo.craftedSoil.blockID)
|
||||
if (block == TRepo.craftedSoil)
|
||||
{
|
||||
if (blockMeta == 5)
|
||||
par1World.setBlock(posX, posY, posZ, this.blockID, 0, 3);
|
||||
par1World.setBlock(posX, posY, posZ, (Block) this, 0, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
@@ -47,9 +48,9 @@ public class SlimeSapling extends BlockSapling
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canThisPlantGrowOnThisBlockID (int id)
|
||||
public boolean canThisPlantGrowOnThisBlockID (Block b)
|
||||
{
|
||||
return id == Blocks.grass.blockID || id == Blocks.dirt.blockID || id == TRepo.slimeGrass.blockID || id == TRepo.craftedSoil.blockID;
|
||||
return b == Blocks.grass || b == Blocks.dirt || b == TRepo.slimeGrass || b == TRepo.craftedSoil;
|
||||
}
|
||||
|
||||
public void updateTick (World world, int x, int y, int z, Random random)
|
||||
@@ -121,7 +122,7 @@ public class SlimeSapling extends BlockSapling
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks (Block b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
public void getSubBlocks (Item b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
for (int i = 0; i < 1; i++)
|
||||
par3List.add(new ItemStack(b, 1, i));
|
||||
|
||||
@@ -57,7 +57,7 @@ public class Punji extends MantleBlock
|
||||
if (meta < 4)
|
||||
{
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
if (stack != null && stack.itemID == TRepo.punji.blockID)
|
||||
if (stack != null && stack == new ItemStack(TRepo.punji))
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta + 1, 3);
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.stepSound.getPlaceSound(),
|
||||
|
||||
Reference in new issue
Block a user