mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Update most of tconstruct.blocks(local)
This commit is contained in:
1 parent
f225fac8e7
commit
70be541d8d
29 files changed
+276
-259
No files matched your search
@@ -56,7 +56,7 @@ public class BlockLandmine extends BlockContainer
|
||||
|
||||
public BlockLandmine()
|
||||
{
|
||||
super(Material.field_151569_G);
|
||||
super(Material.field_151590_u);
|
||||
this.func_149675_a(true);
|
||||
this.func_149676_a(0.0625F, 0.0F, 0.0625F, 1.0F - 0.0625F, 0.0625F, 1.0F - 0.0625F);
|
||||
}
|
||||
|
||||
@@ -71,13 +71,13 @@ public class LavaTankBlock extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass ()
|
||||
public int func_149701_w ()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
public boolean func_149662_c ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public class LavaTankBlock extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_149646_a (IBlockAccess world, int x, int y, int z, int side)
|
||||
public boolean func_149646_a (IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
//if (side == 0 && world.getBlockMetadata(x, y, z) == 0)
|
||||
//return super. func_149646_a(world, x, y, z, side);
|
||||
@@ -101,7 +101,7 @@ public class LavaTankBlock extends BlockContainer
|
||||
@Override
|
||||
public int getLightValue (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
TileEntity logic = world.getBlockTileEntity(x, y, z);
|
||||
TileEntity logic = world.func_147438_o(x, y, z);
|
||||
if (logic != null && logic instanceof LavaTankLogic)
|
||||
return ((LavaTankLogic) logic).getBrightness();
|
||||
return 0;
|
||||
@@ -114,7 +114,7 @@ public class LavaTankBlock extends BlockContainer
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
public int func_149645_b ()
|
||||
{
|
||||
return TankRender.tankModelID;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -27,7 +29,7 @@ public class LiquidMetalFinite extends BlockFluidFinite
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass ()
|
||||
public int func_149701_w ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -40,7 +42,8 @@ public class LiquidMetalFinite extends BlockFluidFinite
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon (int side, int meta)
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
if (side == 0 || side == 1)
|
||||
return stillIcon;
|
||||
@@ -48,7 +51,7 @@ public class LiquidMetalFinite extends BlockFluidFinite
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock (World par1World, int x, int y, int z, Entity entity)
|
||||
public void func_149670_a (World par1World, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockWood;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -15,23 +16,22 @@ import tconstruct.library.TConstructRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class MeatBlock extends Block
|
||||
public class MeatBlock extends BlockWood
|
||||
{
|
||||
public IIcon[] icons;
|
||||
public String[] textureNames = new String[] { "ham_skin", "ham_bone" };
|
||||
|
||||
public MeatBlock()
|
||||
{
|
||||
super(Material.field_151575_d);
|
||||
this.func_149711_c(1.0F);
|
||||
this.setStepSound(Block.soundWoodFootstep);
|
||||
this.func_149672_a(Block.field_149766_f);
|
||||
//setBurnProperties(this.blockID, 5, 20);
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int metadata)
|
||||
public IIcon func_149691_a (int side, int metadata)
|
||||
{
|
||||
int tex = (metadata % 4) * 2;
|
||||
int orientation = metadata / 4;
|
||||
@@ -68,9 +68,9 @@ public class MeatBlock extends Block
|
||||
}
|
||||
}
|
||||
|
||||
public int idDropped (int par1, Random par2Random, int par3)
|
||||
public Item func_149650_a (int par1, Random par2Random, int par3)
|
||||
{
|
||||
return this.blockID;
|
||||
return new ItemStack(this).getItem();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +89,7 @@ public class MeatBlock extends Block
|
||||
{
|
||||
for (int i2 = -b0; i2 <= b0; ++i2)
|
||||
{
|
||||
Block j2 = par1World.getBlock(par2 + k1, par3 + l1, par4 + i2);
|
||||
Block j2 = par1World.func_147439_a(par2 + k1, par3 + l1, par4 + i2);
|
||||
|
||||
if (j2 != null)
|
||||
{
|
||||
@@ -166,23 +166,23 @@ public class MeatBlock extends Block
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks (Item b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
public void func_149666_a (Item b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
for (int i = 0; i < icons.length / 2; i++)
|
||||
par3List.add(new ItemStack(b, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSustainLeaves (World world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWood (World world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// @Override
|
||||
// public boolean canSustainLeaves (World world, int x, int y, int z)
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isWood (World world, int x, int y, int z)
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
public boolean isBeaconBase (World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ)
|
||||
{
|
||||
|
||||
@@ -2,9 +2,9 @@ package tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class MetalOre extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Block b, CreativeTabs tab, List list)
|
||||
public void func_149666_a (Item b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 1; iter < 6; iter++)
|
||||
{
|
||||
|
||||
@@ -127,7 +127,7 @@ public class MultiBrick extends TConstructBlock
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public boolean isBlockNormalCube (World world, int x, int y, int z)
|
||||
public boolean isNormalCube (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return world.getBlockMetadata(x, y, z) != 8;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public class MultiBrickFancy extends TConstructBlock
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public boolean isBlockNormalCube (World world, int x, int y, int z)
|
||||
public boolean isNormalCube (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return world.getBlockMetadata(x, y, z) != 8;
|
||||
}
|
||||
|
||||
@@ -3,11 +3,6 @@ package tconstruct.blocks;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import tconstruct.client.block.OreberryRender;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLeavesBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -16,6 +11,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
@@ -23,8 +19,12 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import tconstruct.client.block.OreberryRender;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -45,10 +45,10 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
this.itemMeat = meta;
|
||||
this.subitems = sub;
|
||||
this.oreTypes = oreTypes;
|
||||
this.setTickRandomly(true);
|
||||
this.func_149675_a(true);
|
||||
random = new Random();
|
||||
this.func_149711_c(0.3F);
|
||||
this.setStepSound(Block.soundMetalFootstep);
|
||||
this.func_149672_a(field_149777_j);
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
}
|
||||
|
||||
@@ -72,9 +72,10 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon (int side, int metadata)
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_149691_a (int side, int metadata)
|
||||
{
|
||||
if (graphicsLevel)
|
||||
if (net.minecraft.client.settings.GameSettings.Options.GRAPHICS.getEnumBoolean())
|
||||
{
|
||||
if (metadata < 12)
|
||||
{
|
||||
@@ -100,14 +101,14 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
|
||||
/* Bushes are stored by size then type */
|
||||
@Override
|
||||
public int damageDropped (int metadata)
|
||||
public int func_149692_a (int metadata)
|
||||
{
|
||||
return metadata % 4;
|
||||
}
|
||||
|
||||
/* The following methods define a berry bush's size depending on metadata */
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
public AxisAlignedBB func_149668_a (World world, int x, int y, int z)
|
||||
{
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
if (l < 4)
|
||||
@@ -179,7 +180,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
|
||||
/* Left-click harvests berries */
|
||||
@Override
|
||||
public void onBlockClicked (World world, int x, int y, int z, EntityPlayer player)
|
||||
public void func_149699_a (World world, int x, int y, int z, EntityPlayer player)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
@@ -194,7 +195,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
|
||||
/* Right-click harvests berries */
|
||||
@Override
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
public boolean func_149727_a (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
/*if (world.isRemote)
|
||||
return false;*/
|
||||
@@ -216,16 +217,11 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
/* Render logic */
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
public boolean func_149662_c ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setGraphicsLevel (boolean flag)
|
||||
{
|
||||
graphicsLevel = flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_149686_d ()
|
||||
{
|
||||
@@ -237,9 +233,10 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
return OreberryRender.model;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean func_149646_a (IBlockAccess iblockaccess, int x, int y, int z, int meta)
|
||||
{
|
||||
if (meta > 7 || graphicsLevel)
|
||||
if (meta > 7 || net.minecraft.client.settings.GameSettings.Options.GRAPHICS.getEnumBoolean())
|
||||
{
|
||||
return super.func_149646_a(iblockaccess, x, y, z, meta);
|
||||
}
|
||||
@@ -286,7 +283,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
public boolean canPlaceBlockAt (World world, int x, int y, int z)
|
||||
{
|
||||
if (world.getFullBlockLightValue(x, y, z) < 13)
|
||||
return super.canPlaceBlockAt(world, x, y, z);
|
||||
return super.func_149742_c(world, x, y, z);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -315,7 +312,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks (Block b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
public void func_149666_a (Item b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
for (int var4 = 8; var4 < 8 + subitems; ++var4)
|
||||
{
|
||||
@@ -336,7 +333,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
|
||||
public void func_149670_a (World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (!(entity instanceof EntityItem))
|
||||
entity.attackEntityFrom(DamageSource.cactus, 1);
|
||||
|
||||
@@ -16,6 +16,7 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -33,10 +34,14 @@ public class PaneBase extends Block
|
||||
this.folder = folder;
|
||||
}
|
||||
|
||||
public boolean canConnectTo (Block block2)
|
||||
public final boolean func_150098_a(Block p_150098_1_)
|
||||
{
|
||||
Block block = block2;
|
||||
return Block.opaqueCubeLookup[block2] || block instanceof PaneBase || block instanceof BlockPane || block2 == Blocks.glass;
|
||||
return p_150098_1_.func_149730_j() || p_150098_1_ == this || p_150098_1_ == Blocks.glass || p_150098_1_ == Blocks.stained_glass || p_150098_1_ == Blocks.stained_glass_pane || p_150098_1_ instanceof BlockPane;
|
||||
}
|
||||
|
||||
public boolean canConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir)
|
||||
{
|
||||
return func_150098_a(world.func_147439_a(x, y, z)) || world.isSideSolid(x, y, z, dir.getOpposite(), false);
|
||||
}
|
||||
|
||||
public IIcon getSideTextureIndex (int meta)
|
||||
@@ -60,13 +65,13 @@ public class PaneBase extends Block
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
return icons[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Item b, CreativeTabs tab, List list)
|
||||
public void func_149666_a (Item b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < textureNames.length; iter++)
|
||||
{
|
||||
@@ -103,41 +108,41 @@ public class PaneBase extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxesToList (World world, int x, int y, int z, AxisAlignedBB axisalignedbb, List arraylist, Entity entity)
|
||||
public void func_149743_a (World world, int x, int y, int z, AxisAlignedBB axisalignedbb, List arraylist, Entity entity)
|
||||
{
|
||||
boolean south = canConnectTo(world.func_147439_a(x, y, z - 1));
|
||||
boolean north = canConnectTo(world.func_147439_a(x, y, z + 1));
|
||||
boolean east = canConnectTo(world.func_147439_a(x - 1, y, z));
|
||||
boolean west = canConnectTo(world.func_147439_a(x + 1, y, z));
|
||||
boolean south = canConnectTo(world, x, y, z - 1, ForgeDirection.NORTH);
|
||||
boolean north = canConnectTo(world, x, y, z + 1, ForgeDirection.SOUTH);
|
||||
boolean east = canConnectTo(world, x - 1, y, z, ForgeDirection.EAST);
|
||||
boolean west = canConnectTo(world, x + 1, y, z, ForgeDirection.WEST);
|
||||
if (east && west || !east && !west && !south && !north)
|
||||
{
|
||||
func_149676_a(0.0F, 0.0F, 0.4375F, 1.0F, 1.0F, 0.5625F);
|
||||
super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
super.func_149743_a(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
}
|
||||
else if (east && !west)
|
||||
{
|
||||
func_149676_a(0.0F, 0.0F, 0.4375F, 0.5F, 1.0F, 0.5625F);
|
||||
super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
super.func_149743_a(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
}
|
||||
else if (!east && west)
|
||||
{
|
||||
func_149676_a(0.5F, 0.0F, 0.4375F, 1.0F, 1.0F, 0.5625F);
|
||||
super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
super.func_149743_a(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
}
|
||||
if (south && north || !east && !west && !south && !north)
|
||||
{
|
||||
func_149676_a(0.4375F, 0.0F, 0.0F, 0.5625F, 1.0F, 1.0F);
|
||||
super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
super.func_149743_a(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
}
|
||||
else if (south && !north)
|
||||
{
|
||||
func_149676_a(0.4375F, 0.0F, 0.0F, 0.5625F, 1.0F, 0.5F);
|
||||
super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
super.func_149743_a(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
}
|
||||
else if (!south && north)
|
||||
{
|
||||
func_149676_a(0.4375F, 0.0F, 0.5F, 0.5625F, 1.0F, 1.0F);
|
||||
super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
super.func_149743_a(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,10 +157,10 @@ public class PaneBase extends Block
|
||||
float f1 = 0.5625F;
|
||||
float f2 = 0.4375F;
|
||||
float f3 = 0.5625F;
|
||||
boolean flag = canConnectTo(iblockaccess.func_147439_a(i, j, k - 1));
|
||||
boolean flag1 = canConnectTo(iblockaccess.func_147439_a(i, j, k + 1));
|
||||
boolean flag2 = canConnectTo(iblockaccess.func_147439_a(i - 1, j, k));
|
||||
boolean flag3 = canConnectTo(iblockaccess.func_147439_a(i + 1, j, k));
|
||||
boolean flag = canConnectTo(iblockaccess, i, j, k - 1, ForgeDirection.NORTH);
|
||||
boolean flag1 = canConnectTo(iblockaccess, i, j, k + 1, ForgeDirection.SOUTH);
|
||||
boolean flag2 = canConnectTo(iblockaccess, i - 1, j, k, ForgeDirection.EAST);
|
||||
boolean flag3 = canConnectTo(iblockaccess, i + 1, j, k, ForgeDirection.WEST);
|
||||
if (flag2 && flag3 || !flag2 && !flag3 && !flag && !flag1)
|
||||
{
|
||||
f = 0.0F;
|
||||
|
||||
@@ -3,33 +3,38 @@ package tconstruct.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.InventoryBlock;
|
||||
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.*;
|
||||
import net.minecraft.world.*;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.logic.*;
|
||||
import tconstruct.blocks.logic.CastingBasinLogic;
|
||||
import tconstruct.blocks.logic.CastingTableLogic;
|
||||
import tconstruct.blocks.logic.FaucetLogic;
|
||||
import tconstruct.client.block.SearedRender;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.event.SmelteryEvent;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SearedBlock extends InventoryBlock
|
||||
{
|
||||
|
||||
public SearedBlock()
|
||||
{
|
||||
super(Material.rock);
|
||||
super(Material.field_151576_e);
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
func_149711_c(3F);
|
||||
func_149752_b(20F);
|
||||
setStepSound(soundMetalFootstep);
|
||||
func_149672_a(field_149777_j);
|
||||
}
|
||||
|
||||
public SearedBlock(String texture)
|
||||
@@ -56,7 +61,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass ()
|
||||
public int func_149701_w ()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -75,7 +80,7 @@ public class SearedBlock extends InventoryBlock
|
||||
|
||||
/* Activation */
|
||||
@Override
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int side, float clickX, float clickY, float clickZ)
|
||||
public boolean func_149727_a (World world, int x, int y, int z, EntityPlayer player, int side, float clickX, float clickY, float clickZ)
|
||||
{
|
||||
int md = world.getBlockMetadata(x, y, z);
|
||||
if (md == 0)
|
||||
@@ -91,19 +96,19 @@ public class SearedBlock extends InventoryBlock
|
||||
if (player.isSneaking())
|
||||
return false;
|
||||
|
||||
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
|
||||
FaucetLogic logic = (FaucetLogic) world.func_147438_o(x, y, z);
|
||||
logic.setActive(true);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return super.onBlockActivated(world, x, y, z, player, side, clickX, clickY, clickZ);
|
||||
return super.func_149727_a(world, x, y, z, player, side, clickX, clickY, clickZ);
|
||||
}
|
||||
|
||||
boolean activateCastingTable (World world, int x, int y, int z, EntityPlayer player)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
CastingTableLogic logic = (CastingTableLogic) world.getBlockTileEntity(x, y, z);
|
||||
CastingTableLogic logic = (CastingTableLogic) world.func_147438_o(x, y, z);
|
||||
if (logic.liquid != null)
|
||||
return true;
|
||||
|
||||
@@ -132,7 +137,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
world.func_147471_g(x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -141,7 +146,7 @@ public class SearedBlock extends InventoryBlock
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
CastingBasinLogic logic = (CastingBasinLogic) world.getBlockTileEntity(x, y, z);
|
||||
CastingBasinLogic logic = (CastingBasinLogic) world.func_147438_o(x, y, z);
|
||||
if (logic.liquid != null)
|
||||
return true;
|
||||
|
||||
@@ -170,7 +175,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
}
|
||||
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
world.func_147471_g(x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -188,7 +193,7 @@ public class SearedBlock extends InventoryBlock
|
||||
|
||||
/* Rendering */
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
public int func_149645_b ()
|
||||
{
|
||||
return SearedRender.searedModel;
|
||||
}
|
||||
@@ -209,6 +214,7 @@ public class SearedBlock extends InventoryBlock
|
||||
|
||||
//TODO getIcon
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
if (meta == 0)
|
||||
@@ -236,7 +242,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
public boolean func_149662_c ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -266,7 +272,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
else
|
||||
{
|
||||
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
|
||||
FaucetLogic logic = (FaucetLogic) world.func_147438_o(x, y, z);
|
||||
float xMin = 0.25F;
|
||||
float xMax = 0.75F;
|
||||
float zMin = 0.25F;
|
||||
@@ -297,7 +303,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
public AxisAlignedBB func_149668_a (World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta != 1)
|
||||
@@ -306,7 +312,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
else
|
||||
{
|
||||
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
|
||||
FaucetLogic logic = (FaucetLogic) world.func_147438_o(x, y, z);
|
||||
if (logic != null)
|
||||
{
|
||||
float xMin = 0.25F;
|
||||
@@ -339,7 +345,7 @@ public class SearedBlock extends InventoryBlock
|
||||
}
|
||||
}
|
||||
|
||||
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
return super.func_149668_a(world, x, y, z);
|
||||
}
|
||||
|
||||
/* Redstone */
|
||||
@@ -352,7 +358,7 @@ public class SearedBlock extends InventoryBlock
|
||||
{
|
||||
if (world.isBlockIndirectlyGettingPowered(x, y, z) && world.getBlockMetadata(x, y, z) == 1)
|
||||
{
|
||||
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
|
||||
FaucetLogic logic = (FaucetLogic) world.func_147438_o(x, y, z);
|
||||
logic.setActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,14 @@ package tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -32,19 +31,19 @@ public class SearedSlab extends SlabBase
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
meta = meta % 8;
|
||||
if (meta == 0)
|
||||
return TRepo.smeltery.getIcon(side, 2);
|
||||
return TRepo.smeltery.func_149691_a(side, 2);
|
||||
if (meta <= 3)
|
||||
return TRepo.smeltery.getIcon(side, meta + 3);
|
||||
return TRepo.smeltery.func_149691_a(side, meta + 3);
|
||||
|
||||
return TRepo.smeltery.getIcon(side, meta + 4);
|
||||
return TRepo.smeltery.func_149691_a(side, meta + 4);
|
||||
}
|
||||
|
||||
@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 < 8; iter++)
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -39,10 +40,10 @@ public class SlabBase extends MantleBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxesToList (World world, int x, int y, int z, AxisAlignedBB axisalignedbb, List arraylist, Entity entity)
|
||||
public void func_149743_a (World world, int x, int y, int z, AxisAlignedBB axisalignedbb, List arraylist, Entity entity)
|
||||
{
|
||||
setBlockBoundsBasedOnState(world, x, y, z);
|
||||
super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
super.func_149743_a(world, x, y, z, axisalignedbb, arraylist, entity);
|
||||
}
|
||||
|
||||
public void setBlockBoundsForItemRender ()
|
||||
@@ -86,14 +87,14 @@ public class SlabBase extends MantleBlock
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
meta = meta % 8 + startingMeta;
|
||||
return modelBlock.getIcon(side, meta);
|
||||
return modelBlock.func_149691_a(side, meta);
|
||||
}
|
||||
|
||||
@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 < totalSize; iter++)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityTNTPrimed;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityArrow;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -26,7 +25,7 @@ public class SlimeExplosive extends TConstructBlock
|
||||
|
||||
public SlimeExplosive()
|
||||
{
|
||||
super(Material.tnt, 0f, getTextureNames());
|
||||
super(Material.field_151590_u, 0f, getTextureNames());
|
||||
}
|
||||
|
||||
static String[] getTextureNames ()
|
||||
@@ -44,13 +43,13 @@ public class SlimeExplosive extends TConstructBlock
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
return icons[(meta / 2) * 3 + getSideTextureIndex(side)];
|
||||
}
|
||||
|
||||
@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 < 2; iter++)
|
||||
{
|
||||
@@ -59,29 +58,29 @@ public class SlimeExplosive extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded (World par1World, int par2, int par3, int par4)
|
||||
public void func_149726_b (World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
super.onBlockAdded(par1World, par2, par3, par4);
|
||||
super.func_149726_b(par1World, par2, par3, par4);
|
||||
|
||||
if (par1World.isBlockIndirectlyGettingPowered(par2, par3, par4))
|
||||
{
|
||||
this.onBlockDestroyedByPlayer(par1World, par2, par3, par4, 1);
|
||||
this.func_149664_b(par1World, par2, par3, par4, 1);
|
||||
WorldHelper.setBlockToAir(par1World, par2, par3, par4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange (World par1World, int par2, int par3, int par4, int par5)
|
||||
public void func_149695_a (World par1World, int par2, int par3, int par4, Block par5Block)
|
||||
{
|
||||
if (par1World.isBlockIndirectlyGettingPowered(par2, par3, par4))
|
||||
{
|
||||
this.onBlockDestroyedByPlayer(par1World, par2, par3, par4, 1);
|
||||
this.func_149664_b(par1World, par2, par3, par4, 1);
|
||||
WorldHelper.setBlockToAir(par1World, par2, par3, par4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockDestroyedByExplosion (World par1World, int par2, int par3, int par4, Explosion par5Explosion)
|
||||
public void func_149723_a (World par1World, int par2, int par3, int par4, Explosion par5Explosion)
|
||||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
@@ -93,7 +92,7 @@ public class SlimeExplosive extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockDestroyedByPlayer (World par1World, int par2, int par3, int par4, int par5)
|
||||
public void func_149664_b (World par1World, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
this.primeTnt(par1World, par2, par3, par4, par5, (EntityLivingBase) null);
|
||||
}
|
||||
@@ -112,7 +111,7 @@ public class SlimeExplosive extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated (World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
public boolean func_149727_a (World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
|
||||
{
|
||||
if (par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() == Items.flint_and_steel)
|
||||
{
|
||||
@@ -123,12 +122,12 @@ public class SlimeExplosive extends TConstructBlock
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.onBlockActivated(par1World, par2, par3, par4, par5EntityPlayer, par6, par7, par8, par9);
|
||||
return super.func_149727_a(par1World, par2, par3, par4, par5EntityPlayer, par6, par7, par8, par9);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock (World par1World, int par2, int par3, int par4, Entity par5Entity)
|
||||
public void func_149670_a (World par1World, int par2, int par3, int par4, Entity par5Entity)
|
||||
{
|
||||
if (par5Entity instanceof EntityArrow && !par1World.isRemote)
|
||||
{
|
||||
@@ -143,7 +142,7 @@ public class SlimeExplosive extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDropFromExplosion (Explosion par1Explosion)
|
||||
public boolean func_149659_a (Explosion par1Explosion)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ public class SlimePad extends MantleBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
public AxisAlignedBB func_149668_a (World world, int x, int y, int z)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
|
||||
public void func_149670_a (World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (!world.isBlockIndirectlyGettingPowered(x, y, z))
|
||||
{
|
||||
@@ -83,7 +83,7 @@ public class SlimePad extends MantleBlock
|
||||
entity.posY += 1;
|
||||
}
|
||||
entity.addVelocity(moveX, speed * 2, moveZ);
|
||||
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, this.stepSound.getStepSound(), (this.stepSound.getVolume()) / 2.0F, this.stepSound.getPitch() * 0.65F);
|
||||
world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, this.field_149762_H.func_150498_e(), (this.field_149762_H.func_150497_c()) / 2.0F, this.field_149762_H.func_150494_d() * 0.65F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class SlimePad extends MantleBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack)
|
||||
public void func_149689_a (World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack)
|
||||
{
|
||||
int face = MathHelper.floor_double((double) (entity.rotationYaw * 8.0F / 360.0F) + 0.5D) + (entity.isSneaking() ? 4 : 0) & 7;
|
||||
int meta = world.getBlockMetadata(x, y, z) & 8;
|
||||
@@ -107,19 +107,19 @@ public class SlimePad extends MantleBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
public boolean func_149662_c ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass ()
|
||||
public int func_149701_w ()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
public int func_149645_b ()
|
||||
{
|
||||
return SlimePadRender.model;
|
||||
}
|
||||
@@ -131,18 +131,20 @@ public class SlimePad extends MantleBlock
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
return TRepo.slimeGel.getIcon(side, 1);
|
||||
return TRepo.slimeGel.func_149691_a(side, 1);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getFluidIcon (int meta)
|
||||
{
|
||||
return TRepo.slimeChannel.getIcon(2, 0);
|
||||
return TRepo.slimeChannel.func_149691_a(2, 0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getNubIcon (int meta)
|
||||
{
|
||||
return TRepo.slimeGel.getIcon(0, 0);
|
||||
return TRepo.slimeGel.func_149691_a(0, 0);
|
||||
}
|
||||
}
|
||||
@@ -35,10 +35,10 @@ public class SmelteryBlock extends InventoryBlock
|
||||
|
||||
public SmelteryBlock()
|
||||
{
|
||||
super(Material.rock);
|
||||
super(Material.field_151576_e);
|
||||
func_149711_c(3F);
|
||||
func_149752_b(20F);
|
||||
setStepSound(soundMetalFootstep);
|
||||
func_149672_a(field_149777_j);
|
||||
rand = new Random();
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
this.func_149663_c("tconstruct.Smeltery");
|
||||
@@ -51,9 +51,8 @@ public class SmelteryBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
/* Rendering */
|
||||
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
public int func_149645_b ()
|
||||
{
|
||||
return PHConstruct.newSmeltery ? 0 : SmelteryRender.smelteryModel;
|
||||
}
|
||||
@@ -209,7 +208,7 @@ public class SmelteryBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int side, float clickX, float clickY, float clickZ)
|
||||
public boolean func_149727_a (World world, int x, int y, int z, EntityPlayer player, int side, float clickX, float clickY, float clickZ)
|
||||
{
|
||||
if (player.isSneaking() || world.getBlockMetadata(x, y, z) != 0)
|
||||
return false;
|
||||
@@ -228,7 +227,7 @@ public class SmelteryBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity func_149915_a (World world, int metadata)
|
||||
public TileEntity createTileEntity (World world, int metadata)
|
||||
{
|
||||
switch (metadata)
|
||||
{
|
||||
@@ -250,9 +249,9 @@ public class SmelteryBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack stack)
|
||||
public void func_149689_a (World world, int x, int y, int z, EntityLivingBase entityliving, ItemStack stack)
|
||||
{
|
||||
super.onBlockPlacedBy(world, x, y, z, entityliving, stack);
|
||||
super.func_149689_a(world, x, y, z, entityliving, stack);
|
||||
if (world.getBlockMetadata(x, y, z) == 0 && !PHConstruct.newSmeltery)
|
||||
onBlockPlacedElsewhere(world, x, y, z, entityliving);
|
||||
}
|
||||
@@ -270,7 +269,7 @@ public class SmelteryBlock extends InventoryBlock
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Item b, CreativeTabs tab, List list)
|
||||
public void func_149666_a (Item b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < 12; iter++)
|
||||
{
|
||||
@@ -281,7 +280,7 @@ public class SmelteryBlock extends InventoryBlock
|
||||
|
||||
/* Updating */
|
||||
@Override
|
||||
public void onNeighborBlockChange (World world, int x, int y, int z, int nBlockID)
|
||||
public void func_149695_a (World world, int x, int y, int z, Block block)
|
||||
{
|
||||
//System.out.println("Neighbor changed");
|
||||
TileEntity logic = world.func_147438_o(x, y, z);
|
||||
@@ -296,13 +295,13 @@ public class SmelteryBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock (World world, int x, int y, int z, Block block, int meta)
|
||||
public void func_149749_a (World world, int x, int y, int z, Block block, int meta)
|
||||
{
|
||||
TileEntity logic = world.func_147438_o(x, y, z);
|
||||
if (logic instanceof IServantLogic)
|
||||
{
|
||||
((IServantLogic) logic).notifyMasterOfChange();
|
||||
}
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
super.func_149749_a(world, x, y, z, block, meta);
|
||||
}
|
||||
}
|
||||
@@ -22,9 +22,9 @@ public class SoilBlock extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityWalking (World world, int x, int y, int z, Entity entity)
|
||||
public void func_149724_b (World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase)
|
||||
if (entity instanceof EntityLivingBase){
|
||||
if (((EntityLivingBase) entity).getCreatureAttribute() == EnumCreatureAttribute.UNDEAD)
|
||||
{
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
@@ -56,17 +56,9 @@ public class SoilBlock extends TConstructBlock
|
||||
}
|
||||
}
|
||||
|
||||
public float getfield_149782_v (World world, int x, int y, int z)
|
||||
public AxisAlignedBB func_149668_a (World world, int x, int y, int z)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 5)
|
||||
return Blocks.dirt.field_149782_v;
|
||||
return this.field_149782_v;
|
||||
}
|
||||
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
{
|
||||
return Blocks.soul_sand.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
return Blocks.soul_sand.func_149668_a(world, x, y, z);
|
||||
}
|
||||
|
||||
/*public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
|
||||
@@ -2,16 +2,15 @@ package tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
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.ColorizerGrass;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -34,23 +33,23 @@ public class SoilSlab extends SlabBase
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
switch (meta % 8)
|
||||
{
|
||||
case 0:
|
||||
return this.field_149761_L;//Block.grass.getIcon(1, 0);
|
||||
case 1:
|
||||
return Blocks.dirt.getIcon(side, 0);
|
||||
return Blocks.dirt.func_149691_a(side, 0);
|
||||
case 2:
|
||||
return Blocks.mycelium.getIcon(1, 0);
|
||||
return Blocks.mycelium.func_149691_a(1, 0);
|
||||
default:
|
||||
return TRepo.craftedSoil.getIcon(side, meta - 3);
|
||||
return TRepo.craftedSoil.func_149691_a(side, meta - 3);
|
||||
}
|
||||
}
|
||||
|
||||
@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 < 8; iter++)
|
||||
{
|
||||
@@ -60,7 +59,7 @@ public class SoilSlab extends SlabBase
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getBlockColor ()
|
||||
public int func_149635_D ()
|
||||
{
|
||||
double d0 = 0.5D;
|
||||
double d1 = 1.0D;
|
||||
@@ -69,16 +68,16 @@ public class SoilSlab extends SlabBase
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderColor (int par1)
|
||||
public int func_149741_i (int par1)
|
||||
{
|
||||
//if (par1 % 8 == 0)
|
||||
return this.getBlockColor();
|
||||
return this.func_149635_D();
|
||||
//return 0xFFFFFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int colorMultiplier (IBlockAccess world, int x, int y, int z)
|
||||
public int func_149720_d (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
int l = 0;
|
||||
int i1 = 0;
|
||||
@@ -88,7 +87,7 @@ public class SoilSlab extends SlabBase
|
||||
{
|
||||
for (int l1 = -1; l1 <= 1; ++l1)
|
||||
{
|
||||
int i2 = world.getBiomeGenForCoords(x + l1, z + k1).getBiomeGrassColor();
|
||||
int i2 = world.getBiomeGenForCoords(x + l1, z + k1).func_150558_b(x, y, z);
|
||||
l += (i2 & 16711680) >> 16;
|
||||
i1 += (i2 & 65280) >> 8;
|
||||
j1 += i2 & 255;
|
||||
|
||||
@@ -2,10 +2,10 @@ package tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -18,12 +18,12 @@ public class SpeedBlock extends TConstructBlock
|
||||
|
||||
public SpeedBlock()
|
||||
{
|
||||
super(Material.rock, 3.0f, textureNames);
|
||||
super(Material.field_151576_e, 3.0f, textureNames);
|
||||
//this.setBlockBounds(0f, 0f, 0f, 1.0f, 0.5f, 1.0f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityWalking (World world, int x, int y, int z, Entity entity)
|
||||
public void func_149724_b (World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
double boost = 2.2D;
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
@@ -43,14 +43,14 @@ public class SpeedBlock extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped (int meta)
|
||||
public int func_149692_a (int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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 < textureNames.length; iter++)
|
||||
{
|
||||
|
||||
@@ -2,17 +2,16 @@ package tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import tconstruct.common.TContent;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -20,7 +19,7 @@ public class SpeedSlab extends SlabBase
|
||||
{
|
||||
public SpeedSlab()
|
||||
{
|
||||
super(Material.rock);
|
||||
super(Material.field_151576_e);
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
func_149711_c(3F);
|
||||
}
|
||||
@@ -33,14 +32,14 @@ public class SpeedSlab extends SlabBase
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
meta = meta % 8;
|
||||
return TRepo.speedBlock.getIcon(side, meta);
|
||||
return TRepo.speedBlock.func_149691_a(side, meta);
|
||||
}
|
||||
|
||||
@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 < 7; iter++)
|
||||
{
|
||||
@@ -49,7 +48,7 @@ public class SpeedSlab extends SlabBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityWalking (World world, int x, int y, int z, Entity entity)
|
||||
public void func_149724_b (World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
double boost = 2.2D;
|
||||
int metadata = world.getBlockMetadata(x, y, z) % 8;
|
||||
|
||||
@@ -5,12 +5,14 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class StoneLadder extends BlockLadder
|
||||
{
|
||||
|
||||
// Override ladder material
|
||||
public final Material blockMaterial = Material.rock;
|
||||
public final Material blockMaterial = Material.field_151576_e;
|
||||
|
||||
private IIcon icon;
|
||||
|
||||
@@ -29,7 +31,8 @@ public class StoneLadder extends BlockLadder
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon (int meta, int side)
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_149691_a (int meta, int side)
|
||||
{
|
||||
return icon;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class StoneTorch extends MantleBlock
|
||||
{
|
||||
super(Material.field_151594_q);
|
||||
this.func_149647_a(CreativeTabs.tabDecorations);
|
||||
setLightValue(0.9375F);
|
||||
func_149715_a(0.9375F);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,7 +68,7 @@ public class StoneTorch extends MantleBlock
|
||||
*/
|
||||
private boolean canPlaceTorchOn (World par1World, int par2, int par3, int par4)
|
||||
{
|
||||
if (par1World.doesBlockHaveSolidTopSurface(par2, par3, par4))
|
||||
if (par1World.func_147466_a(par1World, par2, par3, par4))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -197,7 +197,7 @@ public class StoneTorch extends MantleBlock
|
||||
|
||||
if (flag)
|
||||
{
|
||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||
this.func_149697_b(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -221,7 +221,7 @@ public class StoneTorch extends MantleBlock
|
||||
{
|
||||
if (par1World.func_147439_a(par2, par3, par4) == (Block) this)
|
||||
{
|
||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||
this.func_149697_b(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||
WorldHelper.setBlockToAir(par1World, par2, par3, par4);
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ public class StoneTorch extends MantleBlock
|
||||
this.func_149676_a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.6F, 0.5F + f);
|
||||
}
|
||||
|
||||
return super.collisionRayTrace(par1World, par2, par3, par4, par5Vec3, par6Vec3);
|
||||
return super.func_149731_a(par1World, par2, par3, par4, par5Vec3, par6Vec3);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -28,7 +28,7 @@ public class TConstructBlock extends MantleBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped (int meta)
|
||||
public int func_149692_a (int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class TConstructFluid extends BlockFluidClassic
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass ()
|
||||
public int func_149701_w ()
|
||||
{
|
||||
return alpha ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class TMetalBlock extends TConstructBlock
|
||||
public TMetalBlock(Material material, float hardness)
|
||||
{
|
||||
super(material, hardness, metalTypes);
|
||||
this.setStepSound(Block.soundMetalFootstep);
|
||||
this.func_149672_a(Block.field_149777_j);
|
||||
}
|
||||
|
||||
public boolean isBeaconBase (World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ)
|
||||
|
||||
@@ -7,13 +7,14 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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.AxisAlignedBB;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import tconstruct.blocks.logic.TankAirLogic;
|
||||
import tconstruct.client.block.TankAirRender;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -34,7 +35,7 @@ public class TankAirBlock extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
public int func_149645_b ()
|
||||
{
|
||||
return TankAirRender.model;
|
||||
}
|
||||
@@ -46,7 +47,7 @@ public class TankAirBlock extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
public boolean func_149662_c ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -58,20 +59,20 @@ public class TankAirBlock extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
|
||||
public AxisAlignedBB func_149668_a (World world, int x, int y, int z)
|
||||
{
|
||||
TankAirLogic tank = (TankAirLogic) world.getBlockTileEntity(x, y, z);
|
||||
TankAirLogic tank = (TankAirLogic) world.func_147438_o(x, y, z);
|
||||
if (tank != null && tank.hasItem())
|
||||
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
return super.func_149668_a(world, x, y, z);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public MovingObjectPosition collisionRayTrace (World world, int x, int y, int z, Vec3 par5Vec3, Vec3 par6Vec3)
|
||||
public MovingObjectPosition func_149731_a (World world, int x, int y, int z, Vec3 par5Vec3, Vec3 par6Vec3)
|
||||
{
|
||||
TankAirLogic tank = (TankAirLogic) world.getBlockTileEntity(x, y, z);
|
||||
TankAirLogic tank = (TankAirLogic) world.func_147438_o(x, y, z);
|
||||
if (tank.hasItem())
|
||||
return super.collisionRayTrace(world, x, y, z, par5Vec3, par6Vec3);
|
||||
return super.func_149731_a(world, x, y, z, par5Vec3, par6Vec3);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -83,7 +84,7 @@ public class TankAirBlock extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockReplaceable (World world, int x, int y, int z)
|
||||
public boolean isReplaceable (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -95,13 +96,13 @@ public class TankAirBlock extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAirBlock (World world, int x, int y, int z)
|
||||
public boolean isAir (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (int id, CreativeTabs tab, List list)
|
||||
public void func_149666_a (Item i, CreativeTabs tab, List list)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -30,7 +31,7 @@ public class ToolForgeBlock extends InventoryBlock
|
||||
super(material);
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
this.func_149711_c(2f);
|
||||
this.setStepSound(Block.soundWoodFootstep);
|
||||
this.func_149672_a(Block.field_149777_j);
|
||||
}
|
||||
|
||||
String[] textureNames = { "toolforge_iron", "toolforge_gold", "toolforge_diamond", "toolforge_emerald", "toolforge_cobalt", "toolforge_ardite", "toolforge_manyullyn", "toolforge_copper",
|
||||
@@ -53,7 +54,7 @@ public class ToolForgeBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon (int side, int meta)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
if (side == 1)
|
||||
{
|
||||
@@ -64,15 +65,15 @@ public class ToolForgeBlock extends InventoryBlock
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return Blocks.iron_block.getIcon(side, 0);
|
||||
return Blocks.iron_block.func_149691_a(side, 0);
|
||||
case 1:
|
||||
return Blocks.gold_block.getIcon(side, 0);
|
||||
return Blocks.gold_block.func_149691_a(side, 0);
|
||||
case 2:
|
||||
return Blocks.diamond_block.getIcon(side, 0);
|
||||
return Blocks.diamond_block.func_149691_a(side, 0);
|
||||
case 3:
|
||||
return Blocks.emerald_block.getIcon(side, 0);
|
||||
return Blocks.emerald_block.func_149691_a(side, 0);
|
||||
default:
|
||||
return TRepo.metalBlock.getIcon(side, meta - 4);
|
||||
return TRepo.metalBlock.func_149691_a(side, meta - 4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,19 +87,19 @@ public class ToolForgeBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
public boolean func_149662_c ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockSolidOnSide (World world, int x, int y, int z, ForgeDirection side)
|
||||
public boolean isSideSolid (IBlockAccess world, int x, int y, int z, ForgeDirection side)
|
||||
{
|
||||
return side == ForgeDirection.UP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
public int func_149645_b ()
|
||||
{
|
||||
return TableForgeRender.model;
|
||||
}
|
||||
@@ -129,7 +130,7 @@ public class ToolForgeBlock 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 < textureNames.length; iter++)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,23 @@ package tconstruct.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import mantle.blocks.abstracts.InventoryBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
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.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.logic.PartBuilderLogic;
|
||||
import tconstruct.blocks.logic.PatternChestLogic;
|
||||
@@ -10,20 +27,7 @@ import tconstruct.blocks.logic.ToolStationLogic;
|
||||
import tconstruct.client.block.TableRender;
|
||||
import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import mantle.blocks.abstracts.InventoryBlock;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class ToolStationBlock extends InventoryBlock
|
||||
{
|
||||
@@ -32,7 +36,7 @@ public class ToolStationBlock extends InventoryBlock
|
||||
super(material);
|
||||
this.func_149647_a(TConstructRegistry.blockTab);
|
||||
this.func_149711_c(2f);
|
||||
this.setStepSound(Block.soundWoodFootstep);
|
||||
this.func_149672_a(Block.field_149766_f);
|
||||
}
|
||||
|
||||
//Block.hasComparatorInputOverride and Block.getComparatorInputOverride
|
||||
@@ -51,7 +55,8 @@ public class ToolStationBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon (int side, int meta)
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
if (meta <= 4)
|
||||
{
|
||||
@@ -84,19 +89,19 @@ public class ToolStationBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube ()
|
||||
public boolean func_149662_c ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockSolidOnSide (World world, int x, int y, int z, ForgeDirection side)
|
||||
public boolean isSideSolid (IBlockAccess world, int x, int y, int z, ForgeDirection side)
|
||||
{
|
||||
return side == ForgeDirection.UP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType ()
|
||||
public int func_149645_b ()
|
||||
{
|
||||
return TableRender.tabelModelID;
|
||||
}
|
||||
@@ -111,9 +116,8 @@ public class ToolStationBlock extends InventoryBlock
|
||||
{
|
||||
int metadata = world.getBlockMetadata(x, y, z);
|
||||
if (metadata == 5)
|
||||
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY - 0.125,
|
||||
(double) z + this.maxZ);
|
||||
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.minX, (double) y + this.minY, (double) z + this.minZ, (double) x + this.maxX, (double) y + this.maxY, (double) z + this.maxZ);
|
||||
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.field_149759_B, (double) y + this.field_149760_C, (double) z + this.field_149754_D, (double) x + this.field_149755_E, (double) y + this.field_149756_F - 0.125, (double) z + this.field_149757_G);
|
||||
return AxisAlignedBB.getAABBPool().getAABB((double) x + this.field_149759_B, (double) y + this.field_149760_C, (double) z + this.field_149754_D, (double) x + this.field_149755_E, (double) y + this.field_149756_F, (double) z + this.field_149757_G);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -179,7 +183,7 @@ public class ToolStationBlock 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 < 6; iter++)
|
||||
{
|
||||
@@ -193,14 +197,14 @@ public class ToolStationBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase par5EntityLiving, ItemStack par6ItemStack)
|
||||
public void func_149689_a (World world, int x, int y, int z, EntityLivingBase par5EntityLiving, ItemStack par6ItemStack)
|
||||
{
|
||||
if (PHConstruct.freePatterns)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 5)
|
||||
{
|
||||
PatternChestLogic logic = (PatternChestLogic) world.getBlockTileEntity(x, y, z);
|
||||
PatternChestLogic logic = (PatternChestLogic) world.func_147438_o(x, y, z);
|
||||
for (int i = 1; i <= 13; i++)
|
||||
{
|
||||
logic.setInventorySlotContents(i - 1, new ItemStack(TRepo.woodPattern, 1, i));
|
||||
@@ -208,6 +212,6 @@ public class ToolStationBlock extends InventoryBlock
|
||||
logic.setInventorySlotContents(13, new ItemStack(TRepo.woodPattern, 1, 22));
|
||||
}
|
||||
}
|
||||
super.onBlockPlacedBy(world, x, y, z, par5EntityLiving, par6ItemStack);
|
||||
super.func_149689_a(world, x, y, z, par5EntityLiving, par6ItemStack);
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,14 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBaseRailLogic;
|
||||
import net.minecraft.block.BlockRailBase;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityMinecart;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class WoodRail extends BlockRailBase
|
||||
{
|
||||
@@ -43,7 +42,7 @@ public class WoodRail extends BlockRailBase
|
||||
|
||||
protected void func_94358_a (World par1World, int par2, int par3, int par4, int par5, int par6, Block par7)
|
||||
{
|
||||
if (par7 != Blocks.air && par7.canProvidePower() && (new BlockBaseRailLogic(this, par1World, par2, par3, par4)).getNumberOfAdjacentTracks() == 3)
|
||||
if (par7 != Blocks.air && par7.func_149744_f() && (new BlockBaseRailLogic(this, par1World, par2, par3, par4)).getNumberOfAdjacentTracks() == 3)
|
||||
{
|
||||
this.refreshTrackShape(par1World, par2, par3, par4, false);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLeaves;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.settings.GameSettings.Options;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -31,7 +32,7 @@ public class SlimeLeaves extends BlockLeaves
|
||||
{
|
||||
super();
|
||||
func_149647_a(TConstructRegistry.blockTab);
|
||||
setLightOpacity(1);
|
||||
func_149713_g(1);
|
||||
this.func_149711_c(0.3f);
|
||||
}
|
||||
|
||||
@@ -67,18 +68,20 @@ public class SlimeLeaves extends BlockLeaves
|
||||
}
|
||||
}
|
||||
|
||||
public IIcon getIcon (int side, int meta)
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_149691_a (int side, int meta)
|
||||
{
|
||||
int tex = meta % 4;
|
||||
|
||||
if (this.graphicsLevel)
|
||||
if (Options.GRAPHICS.getEnumBoolean())
|
||||
return fancyIcons[tex];
|
||||
else
|
||||
return fastIcons[tex];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (Item b, CreativeTabs tab, List list)
|
||||
public void func_149666_a (Item b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < fastIcons.length; iter++)
|
||||
{
|
||||
@@ -87,7 +90,7 @@ public class SlimeLeaves extends BlockLeaves
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLeaves (World world, int x, int y, int z)
|
||||
public boolean isLeaves (IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -97,9 +100,9 @@ public class SlimeLeaves extends BlockLeaves
|
||||
/**
|
||||
* Returns the ID of the items to drop on destruction.
|
||||
*/
|
||||
public int idDropped (int par1, Random par2Random, int par3)
|
||||
public Item func_149650_a (int par1, Random par2Random, int par3)
|
||||
{
|
||||
return TRepo.slimeSapling.blockID;
|
||||
return new ItemStack(TRepo.slimeSapling).getItem();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,8 +131,8 @@ public class SlimeLeaves extends BlockLeaves
|
||||
|
||||
if (world.rand.nextInt(dropChance) == 0)
|
||||
{
|
||||
int k1 = this.idDropped(meta, world.rand, fortune);
|
||||
this.dropBlockAsItem_do(world, x, y, z, new ItemStack(k1, 1, this.damageDropped(meta)));
|
||||
Item k1 = this.func_149650_a(meta, world.rand, fortune);
|
||||
this.func_149642_a(world, x, y, z, new ItemStack(k1, 1, this.func_149692_a(meta)));
|
||||
}
|
||||
|
||||
dropChance = 80;
|
||||
@@ -146,8 +149,13 @@ public class SlimeLeaves extends BlockLeaves
|
||||
|
||||
if ((meta & 3) == 0 && world.rand.nextInt(dropChance) == 0)
|
||||
{
|
||||
this.dropBlockAsItem_do(world, x, y, z, new ItemStack(TRepo.strangeFood, 1, 0));
|
||||
this.func_149642_a(world, x, y, z, new ItemStack(TRepo.strangeFood, 1, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] func_150125_e() {
|
||||
return new String[]{"slime"};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user