mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-18 19:39:12 +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(),
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -250,21 +250,21 @@ public class SearedRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
|
||||
float yMin = 0F;
|
||||
int uID = world.getBlockId(x, y - 1, z);
|
||||
Block uBlock= world.getBlockId(x, y - 1, z);
|
||||
int uMeta = world.getBlockMetadata(x, y - 1, z);
|
||||
if (uID == TRepo.searedBlock.blockID && uMeta == 0)
|
||||
if (uBlock== TRepo.searedBlock && uMeta == 0)
|
||||
{
|
||||
yMin = -0.125F;
|
||||
}
|
||||
else if (uID == TRepo.searedBlock.blockID && uMeta == 2)
|
||||
else if (uBlock== TRepo.searedBlock && uMeta == 2)
|
||||
{
|
||||
yMin = -0.75F;
|
||||
}
|
||||
else if (uID == TRepo.lavaTank.blockID)
|
||||
else if (uBlock== TRepo.lavaTank)
|
||||
{
|
||||
yMin = -1F;
|
||||
}
|
||||
else if (uID == TRepo.castingChannel.blockID)
|
||||
else if (uBlock== TRepo.castingChannel)
|
||||
{
|
||||
yMin = -0.5F;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenIronFluid = new Fluid("iron.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenIronFluid))
|
||||
TRepo.moltenIronFluid = FluidRegistry.getFluid("iron.molten");
|
||||
TRepo.moltenIron = new TConstructFluid(PHConstruct.moltenIron, TRepo.moltenIronFluid, Material.lava, "liquid_iron").func_149663_c("fluid.molten.iron");
|
||||
TRepo.moltenIron = new TConstructFluid(PHConstruct.moltenIron, TRepo.moltenIronFluid, Material.field_151587_i, "liquid_iron").func_149663_c("fluid.molten.iron");
|
||||
GameRegistry.registerBlock(TRepo.moltenIron, "fluid.molten.iron");
|
||||
TRepo.moltenIronFluid.setBlockID(TRepo.moltenIron).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenIronFluid, 1000), new ItemStack(TRepo.buckets, 1, 0), new ItemStack(Items.bucket)));
|
||||
@@ -158,7 +158,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenGoldFluid = new Fluid("gold.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenGoldFluid))
|
||||
TRepo.moltenGoldFluid = FluidRegistry.getFluid("gold.molten");
|
||||
TRepo.moltenGold = new TConstructFluid(PHConstruct.moltenGold, TRepo.moltenGoldFluid, Material.lava, "liquid_gold").func_149663_c("fluid.molten.gold");
|
||||
TRepo.moltenGold = new TConstructFluid(PHConstruct.moltenGold, TRepo.moltenGoldFluid, Material.field_151587_i, "liquid_gold").func_149663_c("fluid.molten.gold");
|
||||
GameRegistry.registerBlock(TRepo.moltenGold, "fluid.molten.gold");
|
||||
TRepo.moltenGoldFluid.setBlockID(TRepo.moltenGold).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenGoldFluid, 1000), new ItemStack(TRepo.buckets, 1, 1), new ItemStack(Items.bucket)));
|
||||
@@ -166,7 +166,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenCopperFluid = new Fluid("copper.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenCopperFluid))
|
||||
TRepo.moltenCopperFluid = FluidRegistry.getFluid("copper.molten");
|
||||
TRepo.moltenCopper = new TConstructFluid(PHConstruct.moltenCopper, TRepo.moltenCopperFluid, Material.lava, "liquid_copper").func_149663_c("fluid.molten.copper");
|
||||
TRepo.moltenCopper = new TConstructFluid(PHConstruct.moltenCopper, TRepo.moltenCopperFluid, Material.field_151587_i, "liquid_copper").func_149663_c("fluid.molten.copper");
|
||||
GameRegistry.registerBlock(TRepo.moltenCopper, "fluid.molten.copper");
|
||||
TRepo.moltenCopperFluid.setBlockID(TRepo.moltenCopper).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenCopperFluid, 1000), new ItemStack(TRepo.buckets, 1, 2), new ItemStack(Items.bucket)));
|
||||
@@ -174,7 +174,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenTinFluid = new Fluid("tin.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenTinFluid))
|
||||
TRepo.moltenTinFluid = FluidRegistry.getFluid("tin.molten");
|
||||
TRepo.moltenTin = new TConstructFluid(PHConstruct.moltenTin, TRepo.moltenTinFluid, Material.lava, "liquid_tin").func_149663_c("fluid.molten.tin");
|
||||
TRepo.moltenTin = new TConstructFluid(PHConstruct.moltenTin, TRepo.moltenTinFluid, Material.field_151587_i, "liquid_tin").func_149663_c("fluid.molten.tin");
|
||||
GameRegistry.registerBlock(TRepo.moltenTin, "fluid.molten.tin");
|
||||
TRepo.moltenTinFluid.setBlockID(TRepo.moltenTin).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenTinFluid, 1000), new ItemStack(TRepo.buckets, 1, 3), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -182,7 +182,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenAluminumFluid = new Fluid("aluminum.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenAluminumFluid))
|
||||
TRepo.moltenAluminumFluid = FluidRegistry.getFluid("aluminum.molten");
|
||||
TRepo.moltenAluminum = new TConstructFluid(PHConstruct.moltenAluminum, TRepo.moltenAluminumFluid, Material.lava, "liquid_aluminum").func_149663_c("fluid.molten.aluminum");
|
||||
TRepo.moltenAluminum = new TConstructFluid(PHConstruct.moltenAluminum, TRepo.moltenAluminumFluid, Material.field_151587_i, "liquid_aluminum").func_149663_c("fluid.molten.aluminum");
|
||||
GameRegistry.registerBlock(TRepo.moltenAluminum, "fluid.molten.aluminum");
|
||||
TRepo.moltenAluminumFluid.setBlockID(TRepo.moltenAluminum).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenAluminumFluid, 1000), new ItemStack(TRepo.buckets, 1, 4), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -190,7 +190,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenCobaltFluid = new Fluid("cobalt.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenCobaltFluid))
|
||||
TRepo.moltenCobaltFluid = FluidRegistry.getFluid("cobalt.molten");
|
||||
TRepo.moltenCobalt = new TConstructFluid(PHConstruct.moltenCobalt, TRepo.moltenCobaltFluid, Material.lava, "liquid_cobalt").func_149663_c("fluid.molten.cobalt");
|
||||
TRepo.moltenCobalt = new TConstructFluid(PHConstruct.moltenCobalt, TRepo.moltenCobaltFluid, Material.field_151587_i, "liquid_cobalt").func_149663_c("fluid.molten.cobalt");
|
||||
GameRegistry.registerBlock(TRepo.moltenCobalt, "fluid.molten.cobalt");
|
||||
TRepo.moltenCobaltFluid.setBlockID(TRepo.moltenCobalt).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenCobaltFluid, 1000), new ItemStack(TRepo.buckets, 1, 5), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -198,7 +198,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenArditeFluid = new Fluid("ardite.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenArditeFluid))
|
||||
TRepo.moltenArditeFluid = FluidRegistry.getFluid("ardite.molten");
|
||||
TRepo.moltenArdite = new TConstructFluid(PHConstruct.moltenArdite, TRepo.moltenArditeFluid, Material.lava, "liquid_ardite").func_149663_c("fluid.molten.ardite");
|
||||
TRepo.moltenArdite = new TConstructFluid(PHConstruct.moltenArdite, TRepo.moltenArditeFluid, Material.field_151587_i, "liquid_ardite").func_149663_c("fluid.molten.ardite");
|
||||
GameRegistry.registerBlock(TRepo.moltenArdite, "fluid.molten.ardite");
|
||||
TRepo.moltenArditeFluid.setBlockID(TRepo.moltenArdite).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenArditeFluid, 1000), new ItemStack(TRepo.buckets, 1, 6), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -206,7 +206,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenBronzeFluid = new Fluid("bronze.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenBronzeFluid))
|
||||
TRepo.moltenBronzeFluid = FluidRegistry.getFluid("bronze.molten");
|
||||
TRepo.moltenBronze = new TConstructFluid(PHConstruct.moltenBronze, TRepo.moltenBronzeFluid, Material.lava, "liquid_bronze").func_149663_c("fluid.molten.bronze");
|
||||
TRepo.moltenBronze = new TConstructFluid(PHConstruct.moltenBronze, TRepo.moltenBronzeFluid, Material.field_151587_i, "liquid_bronze").func_149663_c("fluid.molten.bronze");
|
||||
GameRegistry.registerBlock(TRepo.moltenBronze, "fluid.molten.bronze");
|
||||
TRepo.moltenBronzeFluid.setBlockID(TRepo.moltenBronze).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenBronzeFluid, 1000), new ItemStack(TRepo.buckets, 1, 7), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -214,7 +214,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenAlubrassFluid = new Fluid("aluminumbrass.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenAlubrassFluid))
|
||||
TRepo.moltenAlubrassFluid = FluidRegistry.getFluid("aluminumbrass.molten");
|
||||
TRepo.moltenAlubrass = new TConstructFluid(PHConstruct.moltenAlubrass, TRepo.moltenAlubrassFluid, Material.lava, "liquid_alubrass").func_149663_c("fluid.molten.alubrass");
|
||||
TRepo.moltenAlubrass = new TConstructFluid(PHConstruct.moltenAlubrass, TRepo.moltenAlubrassFluid, Material.field_151587_i, "liquid_alubrass").func_149663_c("fluid.molten.alubrass");
|
||||
GameRegistry.registerBlock(TRepo.moltenAlubrass, "fluid.molten.alubrass");
|
||||
TRepo.moltenAlubrassFluid.setBlockID(TRepo.moltenAlubrass).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenAlubrassFluid, 1000), new ItemStack(TRepo.buckets, 1, 8), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -222,7 +222,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenManyullynFluid = new Fluid("manyullyn.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenManyullynFluid))
|
||||
TRepo.moltenManyullynFluid = FluidRegistry.getFluid("manyullyn.molten");
|
||||
TRepo.moltenManyullyn = new TConstructFluid(PHConstruct.moltenManyullyn, TRepo.moltenManyullynFluid, Material.lava, "liquid_manyullyn").func_149663_c("fluid.molten.manyullyn");
|
||||
TRepo.moltenManyullyn = new TConstructFluid(PHConstruct.moltenManyullyn, TRepo.moltenManyullynFluid, Material.field_151587_i, "liquid_manyullyn").func_149663_c("fluid.molten.manyullyn");
|
||||
GameRegistry.registerBlock(TRepo.moltenManyullyn, "fluid.molten.manyullyn");
|
||||
TRepo.moltenManyullynFluid.setBlockID(TRepo.moltenManyullyn).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenManyullynFluid, 1000), new ItemStack(TRepo.buckets, 1, 9), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -230,7 +230,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenAlumiteFluid = new Fluid("alumite.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenAlumiteFluid))
|
||||
TRepo.moltenAlumiteFluid = FluidRegistry.getFluid("alumite.molten");
|
||||
TRepo.moltenAlumite = new TConstructFluid(PHConstruct.moltenAlumite, TRepo.moltenAlumiteFluid, Material.lava, "liquid_alumite").func_149663_c("fluid.molten.alumite");
|
||||
TRepo.moltenAlumite = new TConstructFluid(PHConstruct.moltenAlumite, TRepo.moltenAlumiteFluid, Material.field_151587_i, "liquid_alumite").func_149663_c("fluid.molten.alumite");
|
||||
GameRegistry.registerBlock(TRepo.moltenAlumite, "fluid.molten.alumite");
|
||||
TRepo.moltenAlumiteFluid.setBlockID(TRepo.moltenAlumite).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenAlumiteFluid, 1000), new ItemStack(TRepo.buckets, 1, 10), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -238,7 +238,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenObsidianFluid = new Fluid("obsidian.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenObsidianFluid))
|
||||
TRepo.moltenObsidianFluid = FluidRegistry.getFluid("obsidian.molten");
|
||||
TRepo.moltenObsidian = new TConstructFluid(PHConstruct.moltenObsidian, TRepo.moltenObsidianFluid, Material.lava, "liquid_obsidian").func_149663_c("fluid.molten.obsidian");
|
||||
TRepo.moltenObsidian = new TConstructFluid(PHConstruct.moltenObsidian, TRepo.moltenObsidianFluid, Material.field_151587_i, "liquid_obsidian").func_149663_c("fluid.molten.obsidian");
|
||||
GameRegistry.registerBlock(TRepo.moltenObsidian, "fluid.molten.obsidian");
|
||||
TRepo.moltenObsidianFluid.setBlockID(TRepo.moltenObsidian).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenObsidianFluid, 1000), new ItemStack(TRepo.buckets, 1, 11), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -246,7 +246,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenSteelFluid = new Fluid("steel.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenSteelFluid))
|
||||
TRepo.moltenSteelFluid = FluidRegistry.getFluid("steel.molten");
|
||||
TRepo.moltenSteel = new TConstructFluid(PHConstruct.moltenSteel, TRepo.moltenSteelFluid, Material.lava, "liquid_steel").func_149663_c("fluid.molten.steel");
|
||||
TRepo.moltenSteel = new TConstructFluid(PHConstruct.moltenSteel, TRepo.moltenSteelFluid, Material.field_151587_i, "liquid_steel").func_149663_c("fluid.molten.steel");
|
||||
GameRegistry.registerBlock(TRepo.moltenSteel, "fluid.molten.steel");
|
||||
TRepo.moltenSteelFluid.setBlockID(TRepo.moltenSteel).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenSteelFluid, 1000), new ItemStack(TRepo.buckets, 1, 12), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -254,7 +254,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenGlassFluid = new Fluid("glass.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenGlassFluid))
|
||||
TRepo.moltenGlassFluid = FluidRegistry.getFluid("glass.molten");
|
||||
TRepo.moltenGlass = new TConstructFluid(PHConstruct.moltenGlass, TRepo.moltenGlassFluid, Material.lava, "liquid_glass", true).func_149663_c("fluid.molten.glass");
|
||||
TRepo.moltenGlass = new TConstructFluid(PHConstruct.moltenGlass, TRepo.moltenGlassFluid, Material.field_151587_i, "liquid_glass", true).func_149663_c("fluid.molten.glass");
|
||||
GameRegistry.registerBlock(TRepo.moltenGlass, "fluid.molten.glass");
|
||||
TRepo.moltenGlassFluid.setBlockID(TRepo.moltenGlass).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenGlassFluid, 1000), new ItemStack(TRepo.buckets, 1, 13), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -262,7 +262,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenStoneFluid = new Fluid("stone.seared");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenStoneFluid))
|
||||
TRepo.moltenStoneFluid = FluidRegistry.getFluid("stone.seared");
|
||||
TRepo.moltenStone = new TConstructFluid(PHConstruct.moltenStone, TRepo.moltenStoneFluid, Material.lava, "liquid_stone").func_149663_c("molten.stone");
|
||||
TRepo.moltenStone = new TConstructFluid(PHConstruct.moltenStone, TRepo.moltenStoneFluid, Material.field_151587_i, "liquid_stone").func_149663_c("molten.stone");
|
||||
GameRegistry.registerBlock(TRepo.moltenStone, "molten.stone");
|
||||
TRepo.moltenStoneFluid.setBlockID(TRepo.moltenStone).setLuminosity(12).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenStoneFluid, 1000), new ItemStack(TRepo.buckets, 1, 14), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -286,7 +286,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenNickelFluid = new Fluid("nickel.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenNickelFluid))
|
||||
TRepo.moltenNickelFluid = FluidRegistry.getFluid("nickel.molten");
|
||||
TRepo.moltenNickel = new TConstructFluid(PHConstruct.moltenNickel, TRepo.moltenNickelFluid, Material.lava, "liquid_ferrous").func_149663_c("fluid.molten.nickel");
|
||||
TRepo.moltenNickel = new TConstructFluid(PHConstruct.moltenNickel, TRepo.moltenNickelFluid, Material.field_151587_i, "liquid_ferrous").func_149663_c("fluid.molten.nickel");
|
||||
GameRegistry.registerBlock(TRepo.moltenNickel, "fluid.molten.nickel");
|
||||
TRepo.moltenNickelFluid.setBlockID(TRepo.moltenNickel).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenNickelFluid, 1000), new ItemStack(TRepo.buckets, 1, 17), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -294,7 +294,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenLeadFluid = new Fluid("lead.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenLeadFluid))
|
||||
TRepo.moltenLeadFluid = FluidRegistry.getFluid("lead.molten");
|
||||
TRepo.moltenLead = new TConstructFluid(PHConstruct.moltenLead, TRepo.moltenLeadFluid, Material.lava, "liquid_lead").func_149663_c("fluid.molten.lead");
|
||||
TRepo.moltenLead = new TConstructFluid(PHConstruct.moltenLead, TRepo.moltenLeadFluid, Material.field_151587_i, "liquid_lead").func_149663_c("fluid.molten.lead");
|
||||
GameRegistry.registerBlock(TRepo.moltenLead, "fluid.molten.lead");
|
||||
TRepo.moltenLeadFluid.setBlockID(TRepo.moltenLead).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenLeadFluid, 1000), new ItemStack(TRepo.buckets, 1, 18), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -302,7 +302,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenSilverFluid = new Fluid("silver.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenSilverFluid))
|
||||
TRepo.moltenSilverFluid = FluidRegistry.getFluid("silver.molten");
|
||||
TRepo.moltenSilver = new TConstructFluid(PHConstruct.moltenSilver, TRepo.moltenSilverFluid, Material.lava, "liquid_silver").func_149663_c("fluid.molten.silver");
|
||||
TRepo.moltenSilver = new TConstructFluid(PHConstruct.moltenSilver, TRepo.moltenSilverFluid, Material.field_151587_i, "liquid_silver").func_149663_c("fluid.molten.silver");
|
||||
GameRegistry.registerBlock(TRepo.moltenSilver, "fluid.molten.silver");
|
||||
TRepo.moltenSilverFluid.setBlockID(TRepo.moltenSilver).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenSilverFluid, 1000), new ItemStack(TRepo.buckets, 1, 19), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -310,7 +310,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenShinyFluid = new Fluid("platinum.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenShinyFluid))
|
||||
TRepo.moltenShinyFluid = FluidRegistry.getFluid("platinum.molten");
|
||||
TRepo.moltenShiny = new TConstructFluid(PHConstruct.moltenShiny, TRepo.moltenShinyFluid, Material.lava, "liquid_shiny").func_149663_c("fluid.molten.shiny");
|
||||
TRepo.moltenShiny = new TConstructFluid(PHConstruct.moltenShiny, TRepo.moltenShinyFluid, Material.field_151587_i, "liquid_shiny").func_149663_c("fluid.molten.shiny");
|
||||
GameRegistry.registerBlock(TRepo.moltenShiny, "fluid.molten.shiny");
|
||||
TRepo.moltenShinyFluid.setBlockID(TRepo.moltenShiny).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenShinyFluid, 1000), new ItemStack(TRepo.buckets, 1, 20), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -318,7 +318,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenInvarFluid = new Fluid("invar.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenInvarFluid))
|
||||
TRepo.moltenInvarFluid = FluidRegistry.getFluid("invar.molten");
|
||||
TRepo.moltenInvar = new TConstructFluid(PHConstruct.moltenInvar, TRepo.moltenInvarFluid, Material.lava, "liquid_invar").func_149663_c("fluid.molten.invar");
|
||||
TRepo.moltenInvar = new TConstructFluid(PHConstruct.moltenInvar, TRepo.moltenInvarFluid, Material.field_151587_i, "liquid_invar").func_149663_c("fluid.molten.invar");
|
||||
GameRegistry.registerBlock(TRepo.moltenInvar, "fluid.molten.invar");
|
||||
TRepo.moltenInvarFluid.setBlockID(TRepo.moltenInvar).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenInvarFluid, 1000), new ItemStack(TRepo.buckets, 1, 21), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -326,7 +326,7 @@ public class TContent implements IFuelHandler
|
||||
TRepo.moltenElectrumFluid = new Fluid("electrum.molten");
|
||||
if (!FluidRegistry.registerFluid(TRepo.moltenElectrumFluid))
|
||||
TRepo.moltenElectrumFluid = FluidRegistry.getFluid("electrum.molten");
|
||||
TRepo.moltenElectrum = new TConstructFluid(PHConstruct.moltenElectrum, TRepo.moltenElectrumFluid, Material.lava, "liquid_electrum").func_149663_c("fluid.molten.electrum");
|
||||
TRepo.moltenElectrum = new TConstructFluid(PHConstruct.moltenElectrum, TRepo.moltenElectrumFluid, Material.field_151587_i, "liquid_electrum").func_149663_c("fluid.molten.electrum");
|
||||
GameRegistry.registerBlock(TRepo.moltenElectrum, "fluid.molten.electrum");
|
||||
TRepo.moltenElectrumFluid.setBlockID(TRepo.moltenElectrum).setDensity(3000).setViscosity(6000).setTemperature(1300);
|
||||
FluidContainerRegistry.registerFluidContainer(new FluidContainerData(new FluidStack(TRepo.moltenElectrumFluid, 1000), new ItemStack(TRepo.buckets, 1, 22), new ItemStack(Item.bucketEmpty)));
|
||||
@@ -827,7 +827,7 @@ public class TContent implements IFuelHandler
|
||||
@Override
|
||||
public int getBurnTime (ItemStack fuel)
|
||||
{
|
||||
if (fuel.itemID == TRepo.materials.itemID && fuel.getItemDamage() == 7)
|
||||
if (fuel.getItem() == TRepo.materials && fuel.getItemDamage() == 7)
|
||||
return 26400;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -44,13 +44,12 @@ public class Battleaxe extends HarvestTool
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed (ItemStack itemstack, World world, int bID, int x, int y, int z, EntityLivingBase player)
|
||||
public boolean onBlockDestroyed (ItemStack itemstack, World world, Block b, int x, int y, int z, EntityLivingBase player)
|
||||
{
|
||||
Block block = Block.blocksList[bID];
|
||||
if (block != null && block.blockMaterial == Material.leaves)
|
||||
if (b != null && b.blockMaterial == Material.leaves)
|
||||
return false;
|
||||
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, bID, x, y, z, player, random);
|
||||
return AbilityHelper.onBlockChanged(itemstack, world, b, x, y, z, player, random);
|
||||
}
|
||||
|
||||
static Material[] materials = { Material.wood, Material.vine, Material.circuits, Material.cactus, Material.pumpkin };
|
||||
@@ -247,17 +246,15 @@ public class Battleaxe extends HarvestTool
|
||||
return false;
|
||||
|
||||
World world = player.worldObj;
|
||||
final int woodID = world.getBlockId(x, y, z);
|
||||
final Block wood = Block.blocksList[woodID];
|
||||
final Block wood = world.func_147439_a(x,y,z);
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
final int meta = world.getBlockMetadata(x, y, z);
|
||||
for (int yPos = y + 1; yPos < y + 9; yPos++)
|
||||
{
|
||||
int blockID = world.getBlockId(x, yPos, z);
|
||||
Block block = Block.blocksList[blockID];
|
||||
Block block = world.func_147439_a(x, yPos, z);
|
||||
if (!(tags.getBoolean("Broken")) && block != null && block.blockMaterial == Material.wood)
|
||||
{
|
||||
int localblockID = world.getBlockId(x, yPos, z);
|
||||
Block localblock = world.func_147439_a(x, yPos, z);
|
||||
int localMeta = world.getBlockMetadata(x, yPos, z);
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
|
||||
@@ -283,7 +280,7 @@ public class Battleaxe extends HarvestTool
|
||||
}
|
||||
block.harvestBlock(world, player, x, yPos, z, localMeta);
|
||||
block.onBlockHarvested(world, x, yPos, z, localMeta, player);
|
||||
onBlockDestroyed(stack, world, localblockID, x, yPos, z, player);
|
||||
onBlockDestroyed(stack, world, func_147439_a, x, yPos, z, player);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -297,7 +294,7 @@ public class Battleaxe extends HarvestTool
|
||||
break;
|
||||
}
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, woodID + (meta << 12));
|
||||
world.playAuxSFX(2001, x, y, z, wood.getBlockID() + (meta << 12));
|
||||
return super.onBlockStartBreak(stack, x, y, z, player);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,71 +8,71 @@ import tconstruct.common.TRepo;
|
||||
public enum FluidType
|
||||
{
|
||||
/** Vanilla Water Smelting **/
|
||||
Water(Blocks.snow.blockID, 0, 20, FluidRegistry.getFluid("water"), false),
|
||||
Water(Blocks.snow, 0, 20, FluidRegistry.getFluid("water"), false),
|
||||
/** Iron Smelting **/
|
||||
Iron(Blocks.iron_block.blockID, 0, 600, TRepo.moltenIronFluid, true),
|
||||
Iron(Blocks.iron_block, 0, 600, TRepo.moltenIronFluid, true),
|
||||
/** Gold Smelting **/
|
||||
Gold(Blocks.gold_block.blockID, 0, 400, TRepo.moltenGoldFluid, false),
|
||||
Gold(Blocks.gold_block, 0, 400, TRepo.moltenGoldFluid, false),
|
||||
/** Tin Smelting **/
|
||||
Tin(TRepo.metalBlock.blockID, 5, 400, TRepo.moltenTinFluid, false),
|
||||
Tin(TRepo.metalBlock, 5, 400, TRepo.moltenTinFluid, false),
|
||||
/** Copper Smelting **/
|
||||
Copper(TRepo.metalBlock.blockID, 3, 550, TRepo.moltenCopperFluid, true),
|
||||
Copper(TRepo.metalBlock, 3, 550, TRepo.moltenCopperFluid, true),
|
||||
/** Aluminum Smelting **/
|
||||
Aluminum(TRepo.metalBlock.blockID, 6, 350, TRepo.moltenAluminumFluid, false),
|
||||
Aluminum(TRepo.metalBlock, 6, 350, TRepo.moltenAluminumFluid, false),
|
||||
/** Natural Aluminum Smelting **/
|
||||
NaturalAluminum(TRepo.oreSlag.blockID, 6, 350, TRepo.moltenAluminumFluid, false),
|
||||
NaturalAluminum(TRepo.oreSlag, 6, 350, TRepo.moltenAluminumFluid, false),
|
||||
/** Cobalt Smelting **/
|
||||
Cobalt(TRepo.metalBlock.blockID, 0, 650, TRepo.moltenCobaltFluid, true),
|
||||
Cobalt(TRepo.metalBlock, 0, 650, TRepo.moltenCobaltFluid, true),
|
||||
/** Ardite Smelting **/
|
||||
Ardite(TRepo.metalBlock.blockID, 1, 650, TRepo.moltenArditeFluid, true),
|
||||
Ardite(TRepo.metalBlock, 1, 650, TRepo.moltenArditeFluid, true),
|
||||
/** AluminumBrass Smelting **/
|
||||
AluminumBrass(TRepo.metalBlock.blockID, 7, 350, TRepo.moltenAlubrassFluid, false),
|
||||
AluminumBrass(TRepo.metalBlock, 7, 350, TRepo.moltenAlubrassFluid, false),
|
||||
/** Alumite Smelting **/
|
||||
Alumite(TRepo.metalBlock.blockID, 8, 800, TRepo.moltenAlumiteFluid, true),
|
||||
Alumite(TRepo.metalBlock, 8, 800, TRepo.moltenAlumiteFluid, true),
|
||||
/** Manyullyn Smelting **/
|
||||
Manyullyn(TRepo.metalBlock.blockID, 2, 750, TRepo.moltenManyullynFluid, true),
|
||||
Manyullyn(TRepo.metalBlock, 2, 750, TRepo.moltenManyullynFluid, true),
|
||||
/** Bronze Smelting **/
|
||||
Bronze(TRepo.metalBlock.blockID, 4, 500, TRepo.moltenBronzeFluid, true),
|
||||
Bronze(TRepo.metalBlock, 4, 500, TRepo.moltenBronzeFluid, true),
|
||||
/** Steel Smelting **/
|
||||
Steel(TRepo.metalBlock.blockID, 9, 700, TRepo.moltenSteelFluid, true),
|
||||
Steel(TRepo.metalBlock, 9, 700, TRepo.moltenSteelFluid, true),
|
||||
/** Nickel Smelting **/
|
||||
Nickel(TRepo.metalBlock.blockID, 0, 400, TRepo.moltenNickelFluid, false),
|
||||
Nickel(TRepo.metalBlock, 0, 400, TRepo.moltenNickelFluid, false),
|
||||
/** Lead Smelting **/
|
||||
Lead(TRepo.metalBlock.blockID, 0, 400, TRepo.moltenLeadFluid, false),
|
||||
Lead(TRepo.metalBlock, 0, 400, TRepo.moltenLeadFluid, false),
|
||||
/** Silver Smelting **/
|
||||
Silver(TRepo.metalBlock.blockID, 0, 400, TRepo.moltenSilverFluid, false),
|
||||
Silver(TRepo.metalBlock, 0, 400, TRepo.moltenSilverFluid, false),
|
||||
/** Platinum Smelting **/
|
||||
Platinum(TRepo.metalBlock.blockID, 0, 400, TRepo.moltenShinyFluid, false),
|
||||
Platinum(TRepo.metalBlock, 0, 400, TRepo.moltenShinyFluid, false),
|
||||
/** Invar Smelting **/
|
||||
Invar(TRepo.metalBlock.blockID, 0, 400, TRepo.moltenInvarFluid, false),
|
||||
Invar(TRepo.metalBlock, 0, 400, TRepo.moltenInvarFluid, false),
|
||||
/** Electrum Smelting **/
|
||||
Electrum(TRepo.metalBlock.blockID, 0, 400, TRepo.moltenElectrumFluid, false),
|
||||
Electrum(TRepo.metalBlock, 0, 400, TRepo.moltenElectrumFluid, false),
|
||||
/** Obsidian Smelting **/
|
||||
Obsidian(Block.obsidian.blockID, 0, 750, TRepo.moltenObsidianFluid, true),
|
||||
Obsidian(Blocks.obsidian, 0, 750, TRepo.moltenObsidianFluid, true),
|
||||
/** Ender Smelting **/
|
||||
Ender(TRepo.metalBlock.blockID, 10, 500, TRepo.moltenEnderFluid, false),
|
||||
Ender(TRepo.metalBlock, 10, 500, TRepo.moltenEnderFluid, false),
|
||||
/** Glass Smelting **/
|
||||
Glass(Block.sand.blockID, 0, 625, TRepo.moltenGlassFluid, false),
|
||||
Glass(Blocks.sand, 0, 625, TRepo.moltenGlassFluid, false),
|
||||
/** Stone Smelting **/
|
||||
Stone(Block.stone.blockID, 0, 800, TRepo.moltenStoneFluid, true),
|
||||
Stone(Blocks.stone, 0, 800, TRepo.moltenStoneFluid, true),
|
||||
/** Emerald Smelting **/
|
||||
Emerald(Block.oreEmerald.blockID, 0, 575, TRepo.moltenEmeraldFluid, false),
|
||||
Emerald(Blocks.emerald_ore, 0, 575, TRepo.moltenEmeraldFluid, false),
|
||||
/** Slime Smelting **/
|
||||
Slime(TRepo.slimeGel.blockID, 0, 250, TRepo.blueSlimeFluid, false),
|
||||
Slime(TRepo.slimeGel, 0, 250, TRepo.blueSlimeFluid, false),
|
||||
/** Pigiron Smelting **/
|
||||
PigIron(TRepo.meatBlock.blockID, 0, 610, TRepo.pigIronFluid, true),
|
||||
PigIron(TRepo.meatBlock, 0, 610, TRepo.pigIronFluid, true),
|
||||
/** Glue Smelting **/
|
||||
Glue(TRepo.glueBlock.blockID, 0, 125, TRepo.glueFluid, false);
|
||||
Glue(TRepo.glueBlock, 0, 125, TRepo.glueFluid, false);
|
||||
|
||||
public final int renderBlockID;
|
||||
public final Block renderBlock;
|
||||
public final int renderMeta;
|
||||
public final int baseTemperature;
|
||||
public final Fluid fluid;
|
||||
public final boolean isToolpart;
|
||||
|
||||
FluidType(int blockID, int meta, int baseTemperature, Fluid fluid, boolean isToolpart)
|
||||
FluidType(Block b, int meta, int baseTemperature, Fluid fluid, boolean isToolpart)
|
||||
{
|
||||
this.renderBlockID = blockID;
|
||||
this.renderBlock = b;
|
||||
this.renderMeta = meta;
|
||||
this.baseTemperature = baseTemperature;
|
||||
this.fluid = fluid;
|
||||
@@ -83,7 +83,7 @@ public enum FluidType
|
||||
{
|
||||
for (FluidType ft : values())
|
||||
{
|
||||
if (ft.fluid.getBlockID() == searchedFluid.getBlockID())
|
||||
if (ft.fluid == searchedFluid)
|
||||
return ft;
|
||||
}
|
||||
return null;
|
||||
@@ -93,7 +93,7 @@ public enum FluidType
|
||||
{
|
||||
for (FluidType ft : values())
|
||||
{
|
||||
if (ft.fluid.getBlockID() == searchedFluid.getBlockID())
|
||||
if (ft.fluid == searchedFluid)
|
||||
return ft.baseTemperature;
|
||||
}
|
||||
return 800;
|
||||
|
||||
@@ -495,10 +495,10 @@ public class AbilityHelper
|
||||
return true;
|
||||
}
|
||||
|
||||
int bID = world.getBlockId(x, y, z);
|
||||
int bIDabove = world.getBlockId(x, y + 1, z);
|
||||
Block b = world.getBlockId(x, y, z);
|
||||
Block babove = world.getBlockId(x, y + 1, z);
|
||||
|
||||
if ((side == 0 || bIDabove != 0 || bID != Blocks.grass.blockID) && bID != Blocks.dirt.blockID)
|
||||
if ((side == 0 || babove != Blocks.air || b != Blocks.grass) && b != Blocks.dirt)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -514,7 +514,7 @@ public class AbilityHelper
|
||||
}
|
||||
else
|
||||
{
|
||||
world.setBlock(x, y, z, block.blockID);
|
||||
world.setBlock(x, y, z, block);
|
||||
onBlockChanged(stack, world, 0, x, y, z, player, random);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import tconstruct.library.TConstructRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
@@ -27,10 +28,10 @@ public abstract class HarvestTool extends ToolCore
|
||||
|
||||
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
|
||||
World world = player.worldObj;
|
||||
int bID = player.worldObj.getBlockId(x, y, z);
|
||||
Block block = player.worldObj.func_147439_a(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
Block block = Block.blocksList[bID];
|
||||
if (block == null || bID < 1)
|
||||
//Block block = Block.blocksList[bID];
|
||||
if (block == null || block == Blocks.air)
|
||||
return false;
|
||||
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
|
||||
|
||||
@@ -48,9 +49,9 @@ public abstract class HarvestTool extends ToolCore
|
||||
{
|
||||
world.setBlockToAir(x, y, z);
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
onBlockDestroyed(stack, world, bID, x, y, z, player);
|
||||
onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
if (!world.isRemote)
|
||||
world.playAuxSFX(2001, x, y, z, bID + (meta << 12));
|
||||
world.playAuxSFX(2001, x, y, z, block.getBlockID() + (meta << 12));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.worldgen;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -41,7 +42,7 @@ public class SlimeTreeGen extends WorldGenerator
|
||||
|
||||
if (yPos >= 1 && yPos + height + 1 <= 256)
|
||||
{
|
||||
Block soil = Block.blocksList[world.getBlockId(xPos, yPos - 1, zPos)];
|
||||
Block soil = world.func_147439_a(xPos, yPos - 1, zPos);
|
||||
boolean isSoil = (soil != null && soil.canSustainPlant(world, xPos, yPos - 1, zPos, ForgeDirection.UP, TRepo.slimeSapling));
|
||||
|
||||
if (isSoil)
|
||||
@@ -73,9 +74,8 @@ public class SlimeTreeGen extends WorldGenerator
|
||||
{
|
||||
for (int zPos = range; zPos <= range; zPos++)
|
||||
{
|
||||
int blockID = world.getBlockId(x + xPos, y + yPos, z + zPos);
|
||||
Block block = Block.blocksList[blockID];
|
||||
if (block != null && blockID != TRepo.slimeSapling.blockID && !block.isLeaves(world, x + xPos, y + yPos, z + zPos))
|
||||
Block block = world.func_147439_a(x + xPos, y + yPos, z + zPos);
|
||||
if (block != null && block != TRepo.slimeSapling && !block.isLeaves(world, x + xPos, y + yPos, z + zPos))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -89,8 +89,8 @@ public class SlimeTreeGen extends WorldGenerator
|
||||
int height = y;
|
||||
do
|
||||
{
|
||||
int heightID = world.getBlockId(x, height, z);
|
||||
if ((heightID == TRepo.craftedSoil.blockID || heightID == TRepo.slimeGrass.blockID) && !Block.opaqueCubeLookup[world.getBlockId(x, height + 1, z)])
|
||||
Block heightBL = world.func_147439_a(x, height, z);
|
||||
if ((heightBL == TRepo.craftedSoil || heightBL == TRepo.slimeGrass) && !Block.opaqueCubeLookup[world.func_147439_a(x, height + 1, z)])
|
||||
{
|
||||
ret = height + 1;
|
||||
break;
|
||||
@@ -107,33 +107,33 @@ public class SlimeTreeGen extends WorldGenerator
|
||||
placeDiamondLayer(world, xPos, yPos + height - i, zPos, i + 1);
|
||||
}
|
||||
|
||||
this.setBlockAndMetadata(world, xPos + 4, yPos + height - 3, zPos, 0, 0);
|
||||
this.setBlockAndMetadata(world, xPos - 4, yPos + height - 3, zPos, 0, 0);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 3, zPos + 4, 0, 0);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 3, zPos - 4, 0, 0);
|
||||
this.setBlockAndMetadata(world, xPos + 1, yPos + height - 3, zPos + 1, 0, 0);
|
||||
this.setBlockAndMetadata(world, xPos + 1, yPos + height - 3, zPos - 1, 0, 0);
|
||||
this.setBlockAndMetadata(world, xPos - 1, yPos + height - 3, zPos + 1, 0, 0);
|
||||
this.setBlockAndMetadata(world, xPos - 1, yPos + height - 3, zPos - 1, 0, 0);
|
||||
this.setBlockAndMetadata(world, xPos + 4, yPos + height - 3, zPos, Blocks.air, 0);
|
||||
this.setBlockAndMetadata(world, xPos - 4, yPos + height - 3, zPos, Blocks.air, 0);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 3, zPos + 4, Blocks.air, 0);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 3, zPos - 4, Blocks.air, 0);
|
||||
this.setBlockAndMetadata(world, xPos + 1, yPos + height - 3, zPos + 1, Blocks.air, 0);
|
||||
this.setBlockAndMetadata(world, xPos + 1, yPos + height - 3, zPos - 1, Blocks.air, 0);
|
||||
this.setBlockAndMetadata(world, xPos - 1, yPos + height - 3, zPos + 1, Blocks.air, 0);
|
||||
this.setBlockAndMetadata(world, xPos - 1, yPos + height - 3, zPos - 1, Blocks.air, 0);
|
||||
|
||||
//Drippers
|
||||
this.setBlockAndMetadata(world, xPos + 3, yPos + height - 4, zPos, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 3, yPos + height - 4, zPos, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 4, zPos - 3, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 4, zPos + 3, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 2, yPos + height - 4, zPos + 2, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 2, yPos + height - 4, zPos - 2, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 2, yPos + height - 4, zPos + 2, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 2, yPos + height - 4, zPos - 2, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 3, yPos + height - 4, zPos, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 3, yPos + height - 4, zPos, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 4, zPos - 3, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 4, zPos + 3, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 2, yPos + height - 4, zPos + 2, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 2, yPos + height - 4, zPos - 2, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 2, yPos + height - 4, zPos + 2, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 2, yPos + height - 4, zPos - 2, TRepo.slimeLeaves, this.metaLeaves);
|
||||
|
||||
this.setBlockAndMetadata(world, xPos + 3, yPos + height - 5, zPos, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 3, yPos + height - 5, zPos, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 5, zPos - 3, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 5, zPos + 3, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 2, yPos + height - 5, zPos + 2, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 2, yPos + height - 5, zPos - 2, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 2, yPos + height - 5, zPos + 2, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 2, yPos + height - 5, zPos - 2, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 3, yPos + height - 5, zPos, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 3, yPos + height - 5, zPos, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 5, zPos - 3, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + height - 5, zPos + 3, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 2, yPos + height - 5, zPos + 2, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos + 2, yPos + height - 5, zPos - 2, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 2, yPos + height - 5, zPos + 2, TRepo.slimeLeaves, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, xPos - 2, yPos + height - 5, zPos - 2, TRepo.slimeLeaves, this.metaLeaves);
|
||||
}
|
||||
|
||||
void placeDiamondLayer (World world, int xPos, int yPos, int zPos, int range)
|
||||
@@ -144,7 +144,7 @@ public class SlimeTreeGen extends WorldGenerator
|
||||
{
|
||||
if (Math.abs(x) + Math.abs(z) <= range)
|
||||
{
|
||||
this.setBlockAndMetadata(world, x + xPos, yPos, z + zPos, TRepo.slimeLeaves.blockID, this.metaLeaves);
|
||||
this.setBlockAndMetadata(world, x + xPos, yPos, z + zPos, TRepo.slimeLeaves, this.metaLeaves);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,29 +154,28 @@ public class SlimeTreeGen extends WorldGenerator
|
||||
{
|
||||
for (int localHeight = 0; localHeight < height; ++localHeight)
|
||||
{
|
||||
int blockID = world.getBlockId(xPos, yPos + localHeight, zPos);
|
||||
Block block = world.func_147439_a(xPos, yPos + localHeight, zPos);
|
||||
|
||||
Block block = Block.blocksList[blockID];
|
||||
|
||||
if (blockID == 0 || block == null || block.isLeaves(world, xPos, yPos + localHeight, zPos))
|
||||
if (block == null || block == Blocks.air || block.isLeaves(world, xPos, yPos + localHeight, zPos))
|
||||
{
|
||||
this.setBlockAndMetadata(world, xPos, yPos + localHeight, zPos, TRepo.slimeGel.blockID, this.metaWood);
|
||||
this.setBlockAndMetadata(world, xPos, yPos + localHeight, zPos, TRepo.slimeGel, this.metaWood);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void setBlockAndMetadata (World world, int x, int y, int z, int blockID, int blockMeta)
|
||||
protected void setBlockAndMetadata (World world, int x, int y, int z, Block block, int blockMeta)
|
||||
{
|
||||
Block block = Block.blocksList[world.getBlockId(x, y, z)];
|
||||
if (block == null || block.isBlockReplaceable(world, x, y, z))
|
||||
Block blockWorld = world.func_147439_a(x, y, z);
|
||||
if (blockWorld == null || blockWorld == Blocks.air || blockWorld.isBlockReplaceable(world, x, y, z))
|
||||
{
|
||||
if (this.notify)
|
||||
{
|
||||
world.setBlock(x, y, z, blockID, blockMeta, 3);
|
||||
world.func_147465_d(x, y, z, block, blockMeta, 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
world.setBlock(x, y, z, blockID, blockMeta, 2);
|
||||
world.func_147465_d(x, y, z, block, blockMeta, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ public class SurfaceOreGen extends WorldGenerator
|
||||
int findGround (World world, int x, int y, int z)
|
||||
{
|
||||
int returnHeight = -1;
|
||||
int blockID = world.getBlockId(x, y - 1, z);
|
||||
if (!Block.opaqueCubeLookup[world.getBlockId(x, y, z)] && (blockID == Blocks.dirt.blockID || blockID == Blocks.grass.blockID))
|
||||
Block block = world.func_147439_a(x, y - 1, z);
|
||||
if (!Block.opaqueCubeLookup[world.func_147439_a(x, y, z)] && (block == Blocks.dirt || block == Blocks.grass))
|
||||
{
|
||||
return y;
|
||||
}
|
||||
@@ -49,10 +49,10 @@ public class SurfaceOreGen extends WorldGenerator
|
||||
{
|
||||
break;
|
||||
}
|
||||
int bID = world.getBlockId(x, height, z);
|
||||
if (bID == Blocks.dirt.blockID || bID == Blocks.grass.blockID)
|
||||
Block b = world.func_147439_a(x, height, z);
|
||||
if (b == Blocks.dirt || b == Blocks.grass)
|
||||
{
|
||||
if (!Block.opaqueCubeLookup[world.getBlockId(x, height + 1, z)])
|
||||
if (!Block.opaqueCubeLookup[world.func_147439_a(x, height + 1, z)])
|
||||
{
|
||||
returnHeight = height + 1;
|
||||
}
|
||||
@@ -114,10 +114,10 @@ public class SurfaceOreGen extends WorldGenerator
|
||||
{
|
||||
double d14 = ((double) i3 + 0.5D - d8) / (d10 / 2.0D);
|
||||
|
||||
Block block = Block.blocksList[world.getBlockId(k2, l2, i3)];
|
||||
Block block = world.func_147439_a(k2, l2, i3);
|
||||
if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D)
|
||||
{
|
||||
if (block == null || !Block.opaqueCubeLookup[world.getBlockId(k2, l2, i3)])
|
||||
if (block == null || !Block.opaqueCubeLookup[world.func_147439_a(k2, l2, i3)])
|
||||
world.setBlock(k2, l2, i3, this.minableBlockId, minableBlockMeta, 2);
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user