mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 04:32:26 +00:00
most of item/block will now compile
This commit is contained in:
1 parent
ad96fbfa61
commit
3bf37fa6a7
66 files changed
+282
-249
No files matched your search
@@ -42,9 +42,9 @@ public class BlockLandmine extends BlockContainer
|
||||
// Should explode when broken instead of dropping items(may not actually work
|
||||
boolean explodeOnBroken = false;
|
||||
|
||||
public BlockLandmine(int par1)
|
||||
public BlockLandmine()
|
||||
{
|
||||
super(par1, Material.tnt);
|
||||
super(Material.tnt);
|
||||
this.setTickRandomly(true);
|
||||
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 1.0F - 0.0625F, 0.0625F, 1.0F - 0.0625F);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ConveyorBase extends MantleBlock
|
||||
return super.shouldSideBeRendered(world, x, y, z, side);
|
||||
}
|
||||
|
||||
public Icon[] icons;
|
||||
public IIcon[] icons;
|
||||
|
||||
/* Rendering */
|
||||
@Override
|
||||
|
||||
@@ -27,9 +27,9 @@ import tconstruct.util.config.PHConstruct;
|
||||
|
||||
public class CraftingSlab extends InventorySlab
|
||||
{
|
||||
public CraftingSlab(int id, Material material)
|
||||
public CraftingSlab(Material material)
|
||||
{
|
||||
super(id, material);
|
||||
super(material);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
this.setHardness(2f);
|
||||
this.setStepSound(Block.soundWoodFootstep);
|
||||
@@ -47,7 +47,7 @@ public class CraftingSlab extends InventorySlab
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon (int side, int meta)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
return icons[(meta % 8) * 3 + getTextureIndex(side)];
|
||||
}
|
||||
@@ -123,11 +123,11 @@ public class CraftingSlab extends InventorySlab
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (int id, CreativeTabs tab, List list)
|
||||
public void getSubBlocks (Block b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < 6; iter++)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, iter));
|
||||
list.add(new ItemStack(b, 1, iter));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.TConstruct;
|
||||
@@ -22,7 +22,7 @@ public class CraftingStationBlock extends InventoryBlock
|
||||
{
|
||||
public CraftingStationBlock(int id, Material material)
|
||||
{
|
||||
super(id, material);
|
||||
super(material);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
this.setHardness(2f);
|
||||
this.setStepSound(Block.soundWoodFootstep);
|
||||
@@ -40,7 +40,7 @@ public class CraftingStationBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon (int side, int meta)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
return icons[meta * 3 + getTextureIndex(side)];
|
||||
}
|
||||
@@ -104,11 +104,11 @@ public class CraftingStationBlock extends InventoryBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (int id, CreativeTabs tab, List list)
|
||||
public void getSubBlocks (Block b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 0; iter < 1; iter++)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, iter));
|
||||
list.add(new ItemStack(b, 1, iter));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,12 +8,12 @@ import tconstruct.client.block.DryingRackRender;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import mantle.blocks.abstracts.InventoryBlock;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -224,7 +224,7 @@ public class DryingRack extends InventoryBlock
|
||||
@Override
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
return Block.planks.getIcon(side, 0);
|
||||
return Blocks.planks.getIcon(side, 0);
|
||||
}
|
||||
|
||||
public int getTextureIndex (int side)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package tconstruct.blocks;
|
||||
|
||||
import tconstruct.blocks.logic.EquipLogic;
|
||||
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
@@ -9,17 +8,16 @@ import net.minecraft.world.World;
|
||||
import java.util.*;
|
||||
|
||||
import cpw.mods.fml.relauncher.*;
|
||||
|
||||
import tconstruct.TConstruct;
|
||||
import tconstruct.blocks.logic.FrypanLogic;
|
||||
import tconstruct.client.block.FrypanRender;
|
||||
import mantle.blocks.abstracts.InventoryBlock;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
@@ -28,9 +26,9 @@ import net.minecraft.world.*;
|
||||
public class EquipBlock extends InventoryBlock
|
||||
{
|
||||
|
||||
public EquipBlock(int id, Material material)
|
||||
public EquipBlock(Material material)
|
||||
{
|
||||
super(id, material);
|
||||
super(material);
|
||||
this.setHardness(0.3f);
|
||||
this.setBlockBounds(0, 0, 0, 1, 0.25f, 1);
|
||||
//this.setCreativeTab(ToolConstruct.materialTab);
|
||||
@@ -42,9 +40,9 @@ public class EquipBlock extends InventoryBlock
|
||||
return new String[] { "toolstation_top" };
|
||||
}
|
||||
|
||||
public Icon getIcon (int side, int meta)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
return Block.blockIron.getIcon(side, meta);
|
||||
return Blocks.iron_block.getIcon(side, meta);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -57,12 +57,12 @@ public class FurnaceSlab extends InventorySlab
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon (int side, int meta)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
return icons[(meta % 8) * 3 + getTextureIndex(side)];
|
||||
}
|
||||
|
||||
public Icon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
|
||||
public IIcon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
TileEntity logic = world.getBlockTileEntity(x, y, z);
|
||||
short direction = (logic instanceof IFacingLogic) ? ((IFacingLogic) logic).getRenderDirection() : 0;
|
||||
@@ -97,10 +97,10 @@ public class FurnaceSlab extends InventorySlab
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
String[] textureNames = getTextureNames();
|
||||
this.icons = new Icon[textureNames.length];
|
||||
this.icons = new IIcon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
|
||||
@@ -5,11 +5,11 @@ import tconstruct.blocks.logic.GolemCoreLogic;
|
||||
import tconstruct.common.TContent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -19,19 +19,19 @@ public class GolemHeadBlock extends MantleBlock
|
||||
public static int headTopTex = ModLoader.addOverride("/terrain.png", "/GGE/golemheadtop&bottom.png");
|
||||
public static int face;*/
|
||||
|
||||
public GolemHeadBlock(int id)
|
||||
public GolemHeadBlock()
|
||||
{
|
||||
super(id, Material.ground);
|
||||
super(Material.ground);
|
||||
//setTickRandomly(true);
|
||||
}
|
||||
|
||||
public Icon[] icons;
|
||||
public IIcon[] icons;
|
||||
public String[] textureNames = new String[] { "golemhead_face", "golemhead_side", "golemhead_top" };
|
||||
|
||||
@Override
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
this.icons = new Icon[textureNames.length];
|
||||
this.icons = new IIcon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
|
||||
@@ -18,9 +18,9 @@ public class GravelOre extends BlockSand
|
||||
public String[] textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt" };
|
||||
public IIcon[] icons;
|
||||
|
||||
public GravelOre(int id)
|
||||
public GravelOre()
|
||||
{
|
||||
super(id, Material.craftedSnow);
|
||||
super(Material.craftedSnow);
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
this.setStepSound(soundGravelFootstep);
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -16,12 +16,12 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class MeatBlock extends Block
|
||||
{
|
||||
public Icon[] icons;
|
||||
public IIcon[] icons;
|
||||
public String[] textureNames = new String[] { "ham_skin", "ham_bone" };
|
||||
|
||||
public MeatBlock(int id)
|
||||
public MeatBlock()
|
||||
{
|
||||
super(id, Material.wood);
|
||||
super(Material.wood);
|
||||
this.setHardness(1.0F);
|
||||
this.setStepSound(Block.soundWoodFootstep);
|
||||
//setBurnProperties(this.blockID, 5, 20);
|
||||
@@ -30,7 +30,7 @@ public class MeatBlock extends Block
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon (int side, int metadata)
|
||||
public IIcon getIcon (int side, int metadata)
|
||||
{
|
||||
int tex = (metadata % 4) * 2;
|
||||
int orientation = metadata / 4;
|
||||
@@ -57,9 +57,9 @@ public class MeatBlock extends Block
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
this.icons = new Icon[textureNames.length];
|
||||
this.icons = new IIcon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
@@ -165,10 +165,10 @@ public class MeatBlock extends Block
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
public void getSubBlocks (Block b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
for (int i = 0; i < icons.length / 2; i++)
|
||||
par3List.add(new ItemStack(par1, 1, i));
|
||||
par3List.add(new ItemStack(b, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ 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.ItemStack;
|
||||
@@ -9,9 +10,9 @@ import net.minecraft.world.World;
|
||||
|
||||
public class MetalOre extends TConstructBlock
|
||||
{
|
||||
public MetalOre(int id, Material material, float hardness, String[] tex)
|
||||
public MetalOre(Material material, float hardness, String[] tex)
|
||||
{
|
||||
super(id, material, hardness, tex);
|
||||
super(material, hardness, tex);
|
||||
}
|
||||
|
||||
public float getBlockHardness (World world, int x, int y, int z)
|
||||
@@ -25,11 +26,11 @@ public class MetalOre extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks (int id, CreativeTabs tab, List list)
|
||||
public void getSubBlocks (Block b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int iter = 1; iter < 6; iter++)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, iter));
|
||||
list.add(new ItemStack(b, 1, iter));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -28,23 +29,23 @@ public class MultiBrick extends TConstructBlock
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return Block.obsidian.getBlockHardness(world, x, y, z);
|
||||
return Blocks.obsidian.getBlockHardness(world, x, y, z);
|
||||
case 1:
|
||||
return Block.sandStone.getBlockHardness(world, x, y, z);
|
||||
return Blocks.sandstone.getBlockHardness(world, x, y, z);
|
||||
case 2:
|
||||
return Block.netherrack.getBlockHardness(world, x, y, z);
|
||||
return Blocks.netherrack.getBlockHardness(world, x, y, z);
|
||||
case 3:
|
||||
return Block.stone.getBlockHardness(world, x, y, z);
|
||||
return Blocks.stone.getBlockHardness(world, x, y, z);
|
||||
case 4:
|
||||
return Block.blockIron.getBlockHardness(world, x, y, z);
|
||||
return Blocks.iron_block.getBlockHardness(world, x, y, z);
|
||||
case 5:
|
||||
return Block.blockGold.getBlockHardness(world, x, y, z);
|
||||
return Blocks.gold_block.getBlockHardness(world, x, y, z);
|
||||
case 6:
|
||||
return Block.blockLapis.getBlockHardness(world, x, y, z);
|
||||
return Blocks.lapis_block.getBlockHardness(world, x, y, z);
|
||||
case 7:
|
||||
return Block.blockDiamond.getBlockHardness(world, x, y, z);
|
||||
return Blocks.diamond_block.getBlockHardness(world, x, y, z);
|
||||
case 8:
|
||||
return Block.blockRedstone.getBlockHardness(world, x, y, z);
|
||||
return Blocks.redstone_block.getBlockHardness(world, x, y, z);
|
||||
case 9:
|
||||
return 1.0F;
|
||||
case 10:
|
||||
@@ -52,9 +53,9 @@ public class MultiBrick extends TConstructBlock
|
||||
case 11:
|
||||
return 1.5F;
|
||||
case 12:
|
||||
return Block.whiteStone.getBlockHardness(world, x, y, z);
|
||||
return Blocks.end_stone.getBlockHardness(world, x, y, z);
|
||||
case 13:
|
||||
return Block.obsidian.getBlockHardness(world, x, y, z);
|
||||
return Blocks.obsidian.getBlockHardness(world, x, y, z);
|
||||
default:
|
||||
return blockHardness;
|
||||
}
|
||||
@@ -66,23 +67,23 @@ public class MultiBrick extends TConstructBlock
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return Block.obsidian.getExplosionResistance(entity);
|
||||
return Blocks.obsidian.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 1:
|
||||
return Block.sandStone.getExplosionResistance(entity);
|
||||
return Blocks.sandstone.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 2:
|
||||
return Block.netherrack.getExplosionResistance(entity);
|
||||
return Blocks.netherrack.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 3:
|
||||
return Block.stone.getExplosionResistance(entity);
|
||||
return Blocks.stone.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 4:
|
||||
return Block.blockIron.getExplosionResistance(entity);
|
||||
return Blocks.iron_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 5:
|
||||
return Block.blockGold.getExplosionResistance(entity);
|
||||
return Blocks.gold_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 6:
|
||||
return Block.blockLapis.getExplosionResistance(entity);
|
||||
return Blocks.lapis_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 7:
|
||||
return Block.blockDiamond.getExplosionResistance(entity);
|
||||
return Blocks.diamond_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 8:
|
||||
return Block.blockRedstone.getExplosionResistance(entity);
|
||||
return Blocks.redstone_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 9:
|
||||
return 1.0F;
|
||||
case 10:
|
||||
@@ -90,11 +91,11 @@ public class MultiBrick extends TConstructBlock
|
||||
case 11:
|
||||
return 1.5F;
|
||||
case 12:
|
||||
return Block.whiteStone.getExplosionResistance(entity);
|
||||
return Blocks.end_stone.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 13:
|
||||
return Block.obsidian.getExplosionResistance(entity);
|
||||
return Blocks.obsidian.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
default:
|
||||
return getExplosionResistance(entity);
|
||||
return getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +133,6 @@ public class MultiBrick extends TConstructBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvidePower ()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -17,9 +18,9 @@ public class MultiBrickFancy extends TConstructBlock
|
||||
"fancybrick_diamond", "fancybrick_redstone", "fancybrick_bone", "fancybrick_slime", "fancybrick_blueslime", "fancybrick_endstone", "fancybrick_obsidian_ingot", "fancybrick_stone",
|
||||
"road_stone" };
|
||||
|
||||
public MultiBrickFancy(int id)
|
||||
public MultiBrickFancy()
|
||||
{
|
||||
super(id, Material.rock, 3f, blockTextures);
|
||||
super(material.rock, 3f, blockTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,21 +30,21 @@ public class MultiBrickFancy extends TConstructBlock
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return Block.obsidian.getBlockHardness(world, x, y, z);
|
||||
return Blocks.obsidian.getBlockHardness(world, x, y, z);
|
||||
case 1:
|
||||
return Block.sandStone.getBlockHardness(world, x, y, z);
|
||||
return Blocks.sandstone.getBlockHardness(world, x, y, z);
|
||||
case 2:
|
||||
return Block.netherrack.getBlockHardness(world, x, y, z);
|
||||
return Blocks.netherrack.getBlockHardness(world, x, y, z);
|
||||
case 4:
|
||||
return Block.blockIron.getBlockHardness(world, x, y, z);
|
||||
return Blocks.iron_block.getBlockHardness(world, x, y, z);
|
||||
case 5:
|
||||
return Block.blockGold.getBlockHardness(world, x, y, z);
|
||||
return Blocks.gold_block.getBlockHardness(world, x, y, z);
|
||||
case 6:
|
||||
return Block.blockLapis.getBlockHardness(world, x, y, z);
|
||||
return Blocks.lapis_block.getBlockHardness(world, x, y, z);
|
||||
case 7:
|
||||
return Block.blockDiamond.getBlockHardness(world, x, y, z);
|
||||
return Blocks.diamond_block.getBlockHardness(world, x, y, z);
|
||||
case 8:
|
||||
return Block.blockRedstone.getBlockHardness(world, x, y, z);
|
||||
return Blocks.redstone_block.getBlockHardness(world, x, y, z);
|
||||
case 9:
|
||||
return 1.0F;
|
||||
case 10:
|
||||
@@ -51,13 +52,13 @@ public class MultiBrickFancy extends TConstructBlock
|
||||
case 11:
|
||||
return 1.5F;
|
||||
case 12:
|
||||
return Block.whiteStone.getBlockHardness(world, x, y, z);
|
||||
return Blocks.end_stone.getBlockHardness(world, x, y, z);
|
||||
case 13:
|
||||
return Block.obsidian.getBlockHardness(world, x, y, z);
|
||||
return Blocks.obsidian.getBlockHardness(world, x, y, z);
|
||||
case 3:
|
||||
case 14:
|
||||
case 15:
|
||||
return Block.stone.getBlockHardness(world, x, y, z);
|
||||
return Blocks.stone.getBlockHardness(world, x, y, z);
|
||||
default:
|
||||
return blockHardness;
|
||||
}
|
||||
@@ -69,21 +70,21 @@ public class MultiBrickFancy extends TConstructBlock
|
||||
switch (meta)
|
||||
{
|
||||
case 0:
|
||||
return Block.obsidian.getExplosionResistance(entity);
|
||||
return Blocks.obsidian.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 1:
|
||||
return Block.sandStone.getExplosionResistance(entity);
|
||||
return Blocks.sandstone.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 2:
|
||||
return Block.netherrack.getExplosionResistance(entity);
|
||||
return Blocks.netherrack.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 4:
|
||||
return Block.blockIron.getExplosionResistance(entity);
|
||||
return Blocks.iron_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 5:
|
||||
return Block.blockGold.getExplosionResistance(entity);
|
||||
return Blocks.gold_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 6:
|
||||
return Block.blockLapis.getExplosionResistance(entity);
|
||||
return Blocks.lapis_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 7:
|
||||
return Block.blockDiamond.getExplosionResistance(entity);
|
||||
return Blocks.diamond_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 8:
|
||||
return Block.blockRedstone.getExplosionResistance(entity);
|
||||
return Blocks.redstone_block.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 9:
|
||||
return 1.0F;
|
||||
case 10:
|
||||
@@ -91,15 +92,15 @@ public class MultiBrickFancy extends TConstructBlock
|
||||
case 11:
|
||||
return 1.5F;
|
||||
case 12:
|
||||
return Block.whiteStone.getExplosionResistance(entity);
|
||||
return Blocks.end_stone.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 13:
|
||||
return Block.obsidian.getExplosionResistance(entity);
|
||||
return Blocks.obsidian.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
case 3:
|
||||
case 14:
|
||||
case 15:
|
||||
return Block.stone.getExplosionResistance(entity);
|
||||
return Blocks.stone.getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
default:
|
||||
return getExplosionResistance(entity);
|
||||
return getExplosionResistance(entity, world, meta, meta, meta, explosionZ, explosionZ, explosionZ);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,9 +153,9 @@ public class MultiBrickFancy extends TConstructBlock
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
this.icons = new Icon[textureNames.length];
|
||||
this.icons = new IIcon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.icons.length; ++i)
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ import tconstruct.library.tools.AbilityHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLeavesBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -19,11 +19,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -31,16 +31,16 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
{
|
||||
Random random;
|
||||
public Icon[] fastIcons;
|
||||
public Icon[] fancyIcons;
|
||||
public IIcon[] fastIcons;
|
||||
public IIcon[] fancyIcons;
|
||||
public String[] textureNames;
|
||||
public String[] oreTypes;
|
||||
public int itemMeat;
|
||||
private int subitems;
|
||||
|
||||
public OreberryBush(int id, String[] textureNames, int meta, int sub, String[] oreTypes)
|
||||
public OreberryBush(String[] textureNames, int meta, int sub, String[] oreTypes)
|
||||
{
|
||||
super(id, Material.leaves, false);
|
||||
super(Material.leaves, false);
|
||||
this.textureNames = textureNames;
|
||||
this.itemMeat = meta;
|
||||
this.subitems = sub;
|
||||
@@ -56,10 +56,10 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons (IconRegister iconRegister)
|
||||
public void registerIcons (IIconRegister iconRegister)
|
||||
{
|
||||
this.fastIcons = new Icon[textureNames.length];
|
||||
this.fancyIcons = new Icon[textureNames.length];
|
||||
this.fastIcons = new IIcon[textureNames.length];
|
||||
this.fancyIcons = new IIcon[textureNames.length];
|
||||
|
||||
for (int i = 0; i < this.fastIcons.length; i++)
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon (int side, int metadata)
|
||||
public IIcon getIcon (int side, int metadata)
|
||||
{
|
||||
if (graphicsLevel)
|
||||
{
|
||||
@@ -315,11 +315,11 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
public void getSubBlocks (Block b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
for (int var4 = 8; var4 < 8 + subitems; ++var4)
|
||||
{
|
||||
par3List.add(new ItemStack(par1, 1, var4));
|
||||
par3List.add(new ItemStack(b, 1, var4));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package tconstruct.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
|
||||
@@ -9,7 +10,7 @@ public class OreberryBushEssence extends OreberryBush implements IPlantable
|
||||
{
|
||||
public OreberryBushEssence(int id, String[] textureNames, int meta, int sub, String[] oreTypes)
|
||||
{
|
||||
super(id, textureNames, meta, sub, oreTypes);
|
||||
super(textureNames, meta, sub, oreTypes);
|
||||
}
|
||||
|
||||
/* Bush growth */
|
||||
@@ -29,7 +30,7 @@ public class OreberryBushEssence extends OreberryBush implements IPlantable
|
||||
{
|
||||
if (meta < 12)
|
||||
{
|
||||
world.setBlock(x, y, z, blockID, meta + 4, 3);
|
||||
world.setBlock(x, y, z,(Block) this, meta + 4, 3);
|
||||
}
|
||||
}
|
||||
/*else if (meta < 8)
|
||||
|
||||
@@ -30,7 +30,7 @@ public class BarricadeBlock extends MantleBlock
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
}
|
||||
|
||||
public Icon getIcon (int side, int meta)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
return modelBlock.getIcon(2, modelMeta);
|
||||
}
|
||||
|
||||
@@ -6,17 +6,17 @@ import java.util.Random;
|
||||
|
||||
import mantle.blocks.MantleBlock;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFence;
|
||||
import net.minecraft.block.EnumMobType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -25,9 +25,9 @@ public class Landmine extends MantleBlock
|
||||
/** The mob type that can trigger this pressure plate. */
|
||||
private EnumMobType triggerMobType;
|
||||
|
||||
public Landmine(int par1, EnumMobType par3EnumMobType, Material par4Material)
|
||||
public Landmine(EnumMobType par3EnumMobType, Material par4Material)
|
||||
{
|
||||
super(par1, par4Material);
|
||||
super(par4Material);
|
||||
this.triggerMobType = EnumMobType.mobs;
|
||||
this.setCreativeTab(TConstructRegistry.blockTab);
|
||||
this.setTickRandomly(true);
|
||||
@@ -35,22 +35,22 @@ public class Landmine extends MantleBlock
|
||||
this.setBlockBounds(var5, 0.0F, var5, 1.0F - var5, 0.03125F, 1.0F - var5);
|
||||
}
|
||||
|
||||
public Icon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
|
||||
public IIcon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
Block block = Block.blocksList[world.getBlockId(x, y - 1, z)];
|
||||
if (block != null)
|
||||
{
|
||||
return block.getBlockTexture(world, x, y - 1, z, side);
|
||||
}
|
||||
return Block.sponge.getIcon(side, world.getBlockMetadata(x, y, z));
|
||||
return Blocks.sponge.getIcon(side, world.getBlockMetadata(x, y, z));
|
||||
}
|
||||
|
||||
public Icon getIcon (int side, int meta)
|
||||
public IIcon getIcon (int side, int meta)
|
||||
{
|
||||
return Block.sponge.getIcon(1, meta);
|
||||
return Blocks.sponge.getIcon(1, meta);
|
||||
}
|
||||
|
||||
public void registerIcons (IconRegister par1IconRegister)
|
||||
public void registerIcons (IIconRegister par1IconRegister)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user