mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -733,11 +733,11 @@ public class TRecipes
|
||||
protected static void addRecipesForDryingRack ()
|
||||
{
|
||||
//Drying rack
|
||||
DryingRackRecipes.addDryingRecipe(Items.beefRaw, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 0));
|
||||
DryingRackRecipes.addDryingRecipe(Items.chickenRaw, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 1));
|
||||
DryingRackRecipes.addDryingRecipe(Items.porkRaw, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 2));
|
||||
DryingRackRecipes.addDryingRecipe(Items.beef, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 0));
|
||||
DryingRackRecipes.addDryingRecipe(Items.chicken, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 1));
|
||||
DryingRackRecipes.addDryingRecipe(Items.porkchop, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 2));
|
||||
//DryingRackRecipes.addDryingRecipe(Item.muttonRaw, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 3));
|
||||
DryingRackRecipes.addDryingRecipe(Items.fishRaw, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 4));
|
||||
DryingRackRecipes.addDryingRecipe(Items.fish, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 4));
|
||||
DryingRackRecipes.addDryingRecipe(Items.rotten_flesh, 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 5));
|
||||
DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.strangeFood, 1, 0), 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 6));
|
||||
DryingRackRecipes.addDryingRecipe(new ItemStack(TRepo.strangeFood, 1, 1), 20 * 60 * 5, new ItemStack(TRepo.jerky, 1, 7));
|
||||
|
||||
@@ -7,14 +7,15 @@ import tconstruct.common.TRepo;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.util.IToolPart;
|
||||
import mantle.items.abstracts.CraftingItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class Bowstring extends CraftingItem implements IToolPart
|
||||
{
|
||||
public Bowstring(int id)
|
||||
public Bowstring()
|
||||
{
|
||||
super(id, toolMaterialNames, buildTextureNames("_bowstring"), "parts/", "tinker", TConstructRegistry.materialTab);
|
||||
super(toolMaterialNames, buildTextureNames("_bowstring"), "parts/", "tinker", TConstructRegistry.materialTab);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
@@ -42,12 +43,12 @@ public class Bowstring extends CraftingItem implements IToolPart
|
||||
return stack.getItemDamage();
|
||||
}
|
||||
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
public void getSubItems (Block b, CreativeTabs tab, List list)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, 0));
|
||||
list.add(new ItemStack(b, 1, 0));
|
||||
if (TRepo.thaumcraftAvailable)
|
||||
list.add(new ItemStack(id, 1, 1));
|
||||
list.add(new ItemStack(b, 1, 1));
|
||||
if (Loader.isModLoaded("Natura"))
|
||||
list.add(new ItemStack(id, 1, 2));
|
||||
list.add(new ItemStack(b, 1, 2));
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBucket;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -30,7 +31,7 @@ public class FilledBucket extends ItemBucket
|
||||
//setTextureFile(TRepo.craftingTexture);
|
||||
//setIconIndex(224);
|
||||
setUnlocalizedName("tconstruct.bucket");
|
||||
setContainerItem(Item.bucketEmpty);
|
||||
setContainerItem(Items.bucket);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -123,7 +124,7 @@ public class FilledBucket extends ItemBucket
|
||||
|
||||
if (this.tryPlaceContainedLiquid(world, clickX, clickY, clickZ, stack.getItemDamage()) && !player.capabilities.isCreativeMode)
|
||||
{
|
||||
return new ItemStack(Item.bucketEmpty);
|
||||
return new ItemStack(Items.bucket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +145,7 @@ public class FilledBucket extends ItemBucket
|
||||
if (TRepo.fluidBlocks[type] instanceof BlockFluidFinite)
|
||||
metadata = 7;
|
||||
|
||||
world.setBlock(clickX, clickY, clickZ, TRepo.fluidBlocks[type].blockID, metadata, 3); //TODO: Merge liquids
|
||||
world.setBlock(clickX, clickY, clickZ, TRepo.fluidBlocks[type], metadata, 3); //TODO: Merge liquids
|
||||
} catch (ArrayIndexOutOfBoundsException ex) {
|
||||
TConstruct.logger.warning("AIOBE occured when placing bucket into world; " + ex);
|
||||
return false;
|
||||
|
||||
@@ -7,9 +7,9 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class Fletching extends CraftingItem implements IToolPart
|
||||
{
|
||||
public Fletching(int id)
|
||||
public Fletching()
|
||||
{
|
||||
super(id, toolMaterialNames, buildTextureNames("_fletching"), "parts/", "tinker", TConstructRegistry.materialTab);
|
||||
super(toolMaterialNames, buildTextureNames("_fletching"), "parts/", "tinker", TConstructRegistry.materialTab);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ public class Jerky extends SpecialFood
|
||||
public static float[] saturation = new float[] { 1.0f, 0.8f, 1.0f, 0.8f, 0.8f, 0.4f, 1.0f, 0.25f };
|
||||
public static int[] overhaulHunger = new int[] { 1, 1, 1, 1, 1, 1, 1, 1 };
|
||||
|
||||
public Jerky(int id, boolean hungerOverhaul)
|
||||
public Jerky(boolean hungerOverhaul)
|
||||
{
|
||||
super(id, hungerOverhaul ? overhaulHunger : hunger, saturation, itemNames, textureNames);
|
||||
super(hungerOverhaul ? overhaulHunger : hunger, saturation, itemNames, textureNames);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ public class Manual extends CraftingItem
|
||||
static String[] name = new String[] { "beginner", "toolstation", "smeltery", "diary" };
|
||||
static String[] textureName = new String[] { "tinkerbook_diary", "tinkerbook_toolstation", "tinkerbook_smeltery", "tinkerbook_blue" };
|
||||
|
||||
public Manual(int id)
|
||||
public Manual()
|
||||
{
|
||||
super(id, name, textureName, "", "tinker", TConstructRegistry.materialTab);
|
||||
super(name, textureName, "", "tinker", TConstructRegistry.materialTab);
|
||||
setUnlocalizedName("tconstruct.manual");
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import mantle.items.abstracts.CraftingItem;
|
||||
public class MaterialItem extends CraftingItem
|
||||
{
|
||||
|
||||
public MaterialItem(int id)
|
||||
public MaterialItem()
|
||||
{
|
||||
super(id, materialNames, getTextures(), "materials/", "tinker", TConstructRegistry.materialTab);
|
||||
super(materialNames, getTextures(), "materials/", "tinker", TConstructRegistry.materialTab);
|
||||
}
|
||||
|
||||
private static String[] getTextures ()
|
||||
|
||||
@@ -2,15 +2,16 @@ package tconstruct.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class MetalPattern extends Pattern
|
||||
{
|
||||
|
||||
public MetalPattern(int id, String patternType, String folder)
|
||||
public MetalPattern(String patternType, String folder)
|
||||
{
|
||||
super(id, patternName, getPatternNames(patternType), folder);
|
||||
super(patternName, getPatternNames(patternType), folder);
|
||||
}
|
||||
|
||||
protected static String[] getPatternNames (String partType)
|
||||
@@ -27,10 +28,10 @@ public class MetalPattern extends Pattern
|
||||
private static final String[] patternName = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign",
|
||||
"knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "", "", "arrowhead", "gem" };
|
||||
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
public void getSubItems (Block b)
|
||||
{
|
||||
for (int i = 0; i < patternName.length; i++)
|
||||
if (!(patternName[i].equals("")))
|
||||
list.add(new ItemStack(id, 1, i));
|
||||
list.add(new ItemStack(b, 1, i));
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,9 @@ public class OreBerries extends CraftingItem
|
||||
static String[] names = new String[] { "iron", "gold", "copper", "tin", "aluminum", "essence" };
|
||||
static String[] tex = new String[] { "oreberry_iron", "oreberry_gold", "oreberry_copper", "oreberry_tin", "oreberry_aluminum", "oreberry_essence" };
|
||||
|
||||
public OreBerries(int id)
|
||||
public OreBerries()
|
||||
{
|
||||
super(id, names, tex, "oreberries/", "tinker", TConstructRegistry.materialTab);
|
||||
super(names, tex, "oreberries/", "tinker", TConstructRegistry.materialTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,8 +5,10 @@ import cpw.mods.fml.relauncher.*;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.items.abstracts.CraftingItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
@@ -17,12 +19,12 @@ public class Pattern extends CraftingItem implements IPattern
|
||||
{
|
||||
public Pattern(int id, String patternType, String folder)
|
||||
{
|
||||
this(id, patternName, getPatternNames(patternType), folder);
|
||||
this(patternName, getPatternNames(patternType), folder);
|
||||
}
|
||||
|
||||
public Pattern(int id, String[] names, String[] patternTypes, String folder)
|
||||
public Pattern(String[] names, String[] patternTypes, String folder)
|
||||
{
|
||||
super(id, names, patternTypes, folder, "tinker", TConstructRegistry.materialTab);
|
||||
super(names, patternTypes, folder, "tinker", TConstructRegistry.materialTab);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setContainerItem(this);
|
||||
@@ -41,12 +43,12 @@ public class Pattern extends CraftingItem implements IPattern
|
||||
"knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "bowstring", "fletching", "arrowhead" };
|
||||
|
||||
@Override
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
public void getSubItems (Block b, CreativeTabs tab, List list)
|
||||
{
|
||||
for (int i = 1; i < patternName.length; i++)
|
||||
{
|
||||
//if (i != 23)
|
||||
list.add(new ItemStack(id, 1, i));
|
||||
list.add(new ItemStack(b, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +147,6 @@ public class Pattern extends CraftingItem implements IPattern
|
||||
@Override
|
||||
public ItemStack getPatternOutput (ItemStack stack, ItemStack input, MaterialSet set)
|
||||
{
|
||||
return TConstructRegistry.getPartMapping(this.itemID, stack.getItemDamage(), set.materialID);
|
||||
return TConstructRegistry.getPartMapping((Item)this, stack.getItemDamage(), set.materialID);
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ public class SpecialFood extends ItemFood
|
||||
float[] saturation;
|
||||
String[] unlocalizedNames;
|
||||
String[] iconNames;
|
||||
Icon[] icons;
|
||||
IIcon[] icons;
|
||||
|
||||
public SpecialFood(int[] hunger, float[] saturation, String[] textureNames, String[] iconNames)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ public class SpecialFood extends ItemFood
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage (int meta)
|
||||
{
|
||||
return iicons[0];
|
||||
return icons[0];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -13,9 +13,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class StrangeFood extends SpecialFood
|
||||
{
|
||||
public StrangeFood(int id)
|
||||
public StrangeFood()
|
||||
{
|
||||
super(id, new int[] { 2, 2 }, new float[] { 1f, 1f }, new String[] { "edibleslime", "edibleblood" }, new String[] { "food/edibleslime", "food/edibleblood" });
|
||||
super(new int[] { 2, 2 }, new float[] { 1f, 1f }, new String[] { "edibleslime", "edibleblood" }, new String[] { "food/edibleslime", "food/edibleblood" });
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,9 +7,9 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
public class ToolPartHidden extends ToolPart
|
||||
{
|
||||
|
||||
public ToolPartHidden(int id, String textureType, String name)
|
||||
public ToolPartHidden(String textureType, String name)
|
||||
{
|
||||
super(id, textureType, name);
|
||||
super(textureType, name);
|
||||
}
|
||||
|
||||
public void getSubItems (int id, CreativeTabs tab, List list)
|
||||
|
||||
@@ -5,7 +5,8 @@ import java.util.UUID;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
@@ -31,7 +32,7 @@ public class ExoArmor extends ArmorCore
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons (IconRegister par1IconRegister)
|
||||
public void registerIcons (IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon("tinker:armor/" + textureName + "_"
|
||||
+ (this.armorType == 0 ? "helmet" : this.armorType == 1 ? "chestplate" : this.armorType == 2 ? "leggings" : this.armorType == 3 ? "boots" : "helmet"));
|
||||
@@ -43,9 +44,9 @@ public class ExoArmor extends ArmorCore
|
||||
return "tinker:textures/armor/" + textureName + "_" + layer + ".png";
|
||||
}
|
||||
|
||||
public void getSubItems (int par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
public void getSubItems (Block b, CreativeTabs par2CreativeTabs, List par3List)
|
||||
{
|
||||
ItemStack armor = new ItemStack(par1, 1, 0);
|
||||
ItemStack armor = new ItemStack(b, 1, 0);
|
||||
NBTTagCompound baseTag = new NBTTagCompound();
|
||||
NBTTagList list = new NBTTagList();
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class HeartCanister extends CraftingItem
|
||||
{
|
||||
|
||||
public HeartCanister(int id)
|
||||
public HeartCanister()
|
||||
{
|
||||
super(id, new String[] { "empty", "miniheart.red", "heart" }, new String[] { "canister_empty", "miniheart_red", "canister_heart" }, "", "tinker", TConstructRegistry.materialTab );
|
||||
super(new String[] { "empty", "miniheart.red", "heart" }, new String[] { "canister_empty", "miniheart_red", "canister_heart" }, "", "tinker", TConstructRegistry.materialTab );
|
||||
this.setMaxStackSize(10);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class Knapsack extends CraftingItem
|
||||
{
|
||||
|
||||
public Knapsack(int id)
|
||||
public Knapsack()
|
||||
{
|
||||
super(new String[] { "knapsack" }, new String[] { "knapsack" }, "armor/", "tinker", TConstructRegistry.materialTab);
|
||||
this.setMaxStackSize(10);
|
||||
|
||||
@@ -23,9 +23,9 @@ public class TArmorBase extends ItemArmor
|
||||
//static Minecraft mc = Minecraft.getMinecraft();
|
||||
//private ModelBiped modelArmor;
|
||||
|
||||
public TArmorBase(int id, int armorSlot)
|
||||
public TArmorBase(int armorSlot)
|
||||
{
|
||||
super(id, EnumArmorMaterial.CLOTH, 0, armorSlot);
|
||||
super(EnumArmorMaterial.CLOTH, 0, armorSlot);
|
||||
this.maxStackSize = 1;
|
||||
this.setMaxDamage(100);
|
||||
setNoRepair();
|
||||
|
||||
@@ -6,6 +6,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -16,10 +17,9 @@ public class BarricadeItem extends ItemBlock
|
||||
{
|
||||
private int bID;
|
||||
|
||||
public BarricadeItem(int id)
|
||||
public BarricadeItem(Block b)
|
||||
{
|
||||
super(id);
|
||||
this.bID = id + 256;
|
||||
super(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -31,13 +31,13 @@ public class BarricadeItem extends ItemBlock
|
||||
|
||||
public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
int i1 = world.getBlockId(x, y, z);
|
||||
Block i1 = world.getBlock(x, y, z);
|
||||
|
||||
if (i1 == Block.snow.blockID && (world.getBlockMetadata(x, y, z) & 7) < 1)
|
||||
if (i1 == Blocks.snow && (world.getBlockMetadata(x, y, z) & 7) < 1)
|
||||
{
|
||||
side = 1;
|
||||
}
|
||||
else if (i1 != Block.vine.blockID && i1 != Block.tallGrass.blockID && i1 != Block.deadBush.blockID
|
||||
else if (i1 != Blocks.vine && i1 != Blocks.tallgrass && i1 != Blocks.deadbush
|
||||
&& (Block.blocksList[i1] == null || !Block.blocksList[i1].isBlockReplaceable(world, x, y, z)))
|
||||
{
|
||||
if (side == 0)
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class CastingChannelItem extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "Channel" };
|
||||
|
||||
public CastingChannelItem(int id)
|
||||
public CastingChannelItem(Block b)
|
||||
{
|
||||
super(id, "Smeltery", blockTypes);
|
||||
super(b, "Smeltery", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -14,9 +15,9 @@ public class CraftedSoilItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "Slime", "Grout", "BlueSlime", "GraveyardSoil", "ConsecratedSoil", "blue", "dirt", "Grout" };
|
||||
|
||||
public CraftedSoilItemBlock(int id)
|
||||
public CraftedSoilItemBlock(Block b)
|
||||
{
|
||||
super(id, "CraftedSoil", blockTypes);
|
||||
super(b, "CraftedSoil", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
@@ -8,9 +9,9 @@ public class CraftingSlabItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "tile.CraftingStation", "Crafter", "Parts", "PatternShaper", "PatternChest", "tile.ToolForge" };
|
||||
|
||||
public CraftingSlabItemBlock(int id)
|
||||
public CraftingSlabItemBlock(Block b)
|
||||
{
|
||||
super(id, "ToolStation", blockTypes);
|
||||
super(b, "ToolStation", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -11,9 +12,9 @@ public class GlassBlockItem extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "pure" };//, "soul", "soul.pure" };
|
||||
|
||||
public GlassBlockItem(int id)
|
||||
public GlassBlockItem(Block b)
|
||||
{
|
||||
super(id, "block.glass", blockTypes);
|
||||
super(b, "block.glass", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class GlassPaneItem extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "pure", "soul", "soul.pure" };
|
||||
|
||||
public GlassPaneItem(int id)
|
||||
public GlassPaneItem(Block b)
|
||||
{
|
||||
super(id, "block.glass", "pane", blockTypes);
|
||||
super(b, "block.glass", "pane", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -9,9 +10,9 @@ public class GravelOreItem extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "iron", "gold", "copper", "tin", "aluminum", "cobalt" };
|
||||
|
||||
public GravelOreItem(int id)
|
||||
public GravelOreItem(Block b)
|
||||
{
|
||||
super(id, "block.ore.gravel", blockTypes);
|
||||
super(b, "block.ore.gravel", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package tconstruct.items.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
@@ -18,9 +19,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class HamboneItemBlock extends ItemBlock
|
||||
{
|
||||
public HamboneItemBlock(int id)
|
||||
public HamboneItemBlock(Block b)
|
||||
{
|
||||
super(id);
|
||||
super(b);
|
||||
itemUseDuration = 32;
|
||||
if (Loader.isModLoaded("HungerOverhaul"))
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -19,9 +20,9 @@ import tconstruct.common.TRepo;
|
||||
public class ItemBlockLandmine extends ItemBlock
|
||||
{
|
||||
|
||||
public ItemBlockLandmine(int par1)
|
||||
public ItemBlockLandmine(Block b)
|
||||
{
|
||||
super(par1);
|
||||
super(b);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -14,9 +15,9 @@ public class LavaTankItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "Tank", "Gague", "Window" };
|
||||
|
||||
public LavaTankItemBlock(int id)
|
||||
public LavaTankItemBlock(Block b)
|
||||
{
|
||||
super(id, "LavaTank", blockTypes);
|
||||
super(b, "LavaTank", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -11,9 +12,9 @@ public class MetalItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze", "Tin", "Aluminum", "AlBrass", "Alumite", "Steel", "Ender" };
|
||||
|
||||
public MetalItemBlock(int id)
|
||||
public MetalItemBlock(Block b)
|
||||
{
|
||||
super(id, "StorageMetals", blockTypes);
|
||||
super(b, "StorageMetals", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -13,9 +14,9 @@ public class MetalOreItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "NetherSlag", "Cobalt", "Ardite", "Copper", "Tin", "Aluminum", "Slag" };
|
||||
|
||||
public MetalOreItemBlock(int id)
|
||||
public MetalOreItemBlock(Block b)
|
||||
{
|
||||
super(id, "MetalOre", blockTypes);
|
||||
super(b, "MetalOre", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -14,9 +15,9 @@ public class MultiBrickFancyItem extends MultiItemBlock
|
||||
static String blockTypes[] = { "obsidian", "sandstone", "netherrack", "stone.refined", "iron", "gold", "lapis", "diamond", "redstone", "bone", "slime", "blueslime", "endstone", "obsidian.ingot",
|
||||
"stone", "stone.road" };
|
||||
|
||||
public MultiBrickFancyItem(int id)
|
||||
public MultiBrickFancyItem(Block b)
|
||||
{
|
||||
super(id, "block.fancybrick", blockTypes);
|
||||
super(b, "block.fancybrick", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -16,9 +17,9 @@ public class MultiBrickItem extends MultiItemBlock
|
||||
static String blockTypes[] = { "obsidian", "sandstone", "netherrack", "stone.refined", "iron", "gold", "lapis", "diamond", "redstone", "bone", "slime", "blueslime", "endstone", "obsidian.ingot",
|
||||
"stone.road", "stone.refined.road" };
|
||||
|
||||
public MultiBrickItem(int id)
|
||||
public MultiBrickItem(Block b)
|
||||
{
|
||||
super(id, "block.brick", blockTypes);
|
||||
super(b, "block.brick", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -19,10 +19,9 @@ public class OreberryBushItem extends MultiItemBlock
|
||||
public int blockID;
|
||||
public static final String blockTypes[] = { "iron", "gold", "copper", "tin", "iron", "gold", "copper", "tin", "iron", "gold", "copper", "tin", "iron", "gold", "copper", "tin" };
|
||||
|
||||
public OreberryBushItem(int id)
|
||||
public OreberryBushItem(Block b)
|
||||
{
|
||||
super(id, "block.oreberry", blockTypes);
|
||||
blockID = id + 256;
|
||||
super(b, "block.oreberry", blockTypes);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -21,10 +21,9 @@ public class OreberryBushSecondItem extends MultiItemBlock
|
||||
public int blockID;
|
||||
public static final String blockTypes[] = { "aluminum", "essence", "", "", "aluminum", "essence", "", "", "aluminum", "essence", "", "", "aluminum", "essence", "", "" };
|
||||
|
||||
public OreberryBushSecondItem(int id)
|
||||
public OreberryBushSecondItem(Block b)
|
||||
{
|
||||
super(id, "block.oreberry", blockTypes);
|
||||
blockID = id + 256;
|
||||
super(b, "block.oreberry", blockTypes);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -9,9 +10,9 @@ public class SearedSlabItem extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "brick", "stone", "cobble", "paver", "road", "fancy", "square", "creeper" };
|
||||
|
||||
public SearedSlabItem(int id)
|
||||
public SearedSlabItem(Block b)
|
||||
{
|
||||
super(id, "block.searedstone.slab", blockTypes);
|
||||
super(b, "block.searedstone.slab", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class SearedTableItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "Table", "Faucet", "Basin" };
|
||||
|
||||
public SearedTableItemBlock(int id)
|
||||
public SearedTableItemBlock(Block b)
|
||||
{
|
||||
super(id, "SearedBlock", blockTypes);
|
||||
super(b, "SearedBlock", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class SlimeGelItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "blue", "green", "purple", "magma", "yellow", "red", "metal" };
|
||||
|
||||
public SlimeGelItemBlock(int id)
|
||||
public SlimeGelItemBlock(Block b)
|
||||
{
|
||||
super(id, "block.slime.congealed", blockTypes);
|
||||
super(b, "block.slime.congealed", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class SlimeGrassItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "blue", "dirt" };
|
||||
|
||||
public SlimeGrassItemBlock(int id)
|
||||
public SlimeGrassItemBlock(Block b)
|
||||
{
|
||||
super(id, "block.slime.grass", blockTypes);
|
||||
super(b, "block.slime.grass", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -14,9 +15,9 @@ public class SlimeLeavesItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "blue" };
|
||||
|
||||
public SlimeLeavesItemBlock(int id)
|
||||
public SlimeLeavesItemBlock(Block b)
|
||||
{
|
||||
super(id, "block.slime.leaves", blockTypes);
|
||||
super(b, "block.slime.leaves", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
|
||||
@@ -7,9 +8,9 @@ public class SlimeSaplingItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "bluegreen" };
|
||||
|
||||
public SlimeSaplingItemBlock(int id)
|
||||
public SlimeSaplingItemBlock(Block b)
|
||||
{
|
||||
super(id, "block.slime.sapling", blockTypes);
|
||||
super(b, "block.slime.sapling", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -13,9 +14,9 @@ public class SmelteryItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "Controller", "Drain", "Brick", "Furnace", "Stone", "Cobblestone", "Paver", "Brick.Cracked", "Road", "Brick.Fancy", "Brick.Square" };
|
||||
|
||||
public SmelteryItemBlock(int id)
|
||||
public SmelteryItemBlock(Block b)
|
||||
{
|
||||
super(id, "Smeltery", blockTypes);
|
||||
super(b, "Smeltery", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -13,9 +14,9 @@ public class SoilSlabItem extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "grass", "dirt", "mycelium", "slime", "grout", "blueslime", "graveyardsoil", "consecratedsoil" };
|
||||
|
||||
public SoilSlabItem(int id)
|
||||
public SoilSlabItem(Block b)
|
||||
{
|
||||
super(id, "block.soil.slab", blockTypes );
|
||||
super(b, "block.soil.slab", blockTypes );
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -14,9 +15,9 @@ public class SpeedBlockItem extends MultiItemBlock
|
||||
public static final String blockTypes[] = { "brownstone.rough", "brownstone.rough.road", "brownstone.smooth", "brownstone.smooth.brick", "brownstone.smooth.road", "brownstone.smooth.fancy",
|
||||
"brownstone.smooth.chiseled" };
|
||||
|
||||
public SpeedBlockItem(int id)
|
||||
public SpeedBlockItem(Block b)
|
||||
{
|
||||
super(id, "block", blockTypes);
|
||||
super(b, "block", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import java.util.List;
|
||||
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -12,9 +13,9 @@ public class SpeedSlabItem extends MultiItemBlock
|
||||
public static final String blockTypes[] = { "brownstone.rough", "brownstone.rough.road", "brownstone.smooth", "brownstone.smooth.brick", "brownstone.smooth.road",
|
||||
"brownstone.smooth.fancy", "brownstone.smooth.chiseled" };
|
||||
|
||||
public SpeedSlabItem(int id)
|
||||
public SpeedSlabItem(Block b)
|
||||
{
|
||||
super(id, "block", "slab", blockTypes);
|
||||
super(b, "block", "slab", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class StainedGlassClearItem extends MultiItemBlock
|
||||
{
|
||||
public static final String blockTypes[] = { "white", "orange", "magenta", "lightblue", "yellow", "lime", "pink", "gray", "lightgray", "cyan", "purple", "blue", "brown", "green", "red", "black" };
|
||||
|
||||
public StainedGlassClearItem(int id)
|
||||
public StainedGlassClearItem(Block b)
|
||||
{
|
||||
super(id, "block.stainedglass", blockTypes);
|
||||
super(b, "block.stainedglass", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class StainedGlassClearPaneItem extends MultiItemBlock
|
||||
@@ -7,9 +8,9 @@ public class StainedGlassClearPaneItem extends MultiItemBlock
|
||||
public static final String blockTypes[] = { "white", "orange", "magenta", "lightblue", "yellow", "lime", "pink", "gray", "lightgray", "cyan",
|
||||
"purple", "blue", "brown", "green", "red", "black" };
|
||||
|
||||
public StainedGlassClearPaneItem(int id)
|
||||
public StainedGlassClearPaneItem(Block b)
|
||||
{
|
||||
super(id, "block.stainedglass", "pane", blockTypes);
|
||||
super(b, "block.stainedglass", "pane", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class ToolStationItemBlock extends MultiItemBlock
|
||||
@@ -7,9 +8,9 @@ public class ToolStationItemBlock extends MultiItemBlock
|
||||
public static final String blockTypes[] = { "Crafter", "Parts", "Parts", "Parts", "Parts", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternChest", "PatternShaper",
|
||||
"PatternShaper", "PatternShaper", "PatternShaper", "CastingTable" };
|
||||
|
||||
public ToolStationItemBlock(int id)
|
||||
public ToolStationItemBlock(Block b)
|
||||
{
|
||||
super(id, "ToolStation", blockTypes);
|
||||
super(b, "ToolStation", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -12,9 +13,9 @@ public class WoolSlab1Item extends MultiItemBlock
|
||||
int blockID;
|
||||
Block block;
|
||||
|
||||
public WoolSlab1Item(int id)
|
||||
public WoolSlab1Item(Block b)
|
||||
{
|
||||
super(id, "", "slab", ItemDye.dyeColorNames);
|
||||
super(b, "", "slab", ItemDye.dyeColorNames);
|
||||
this.setSpecialIndex(7, 15);
|
||||
this.blockID = id + 256;
|
||||
this.block = Block.blocksList[id + 256];
|
||||
@@ -32,7 +33,7 @@ public class WoolSlab1Item extends MultiItemBlock
|
||||
|
||||
if ((side == 1 && flag || side == 0 && !flag) && id == this.blockID && trueMeta == stack.getItemDamage())
|
||||
{
|
||||
if (world.setBlock(x, y, z, Block.cloth.blockID, trueMeta, 3))
|
||||
if (world.setBlock(x, y, z, Blocks.wool.blockID, trueMeta, 3))
|
||||
{
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.block.stepSound.getPlaceSound(),
|
||||
(this.block.stepSound.getVolume() + 1.0F) / 2.0F, this.block.stepSound.getPitch() * 0.8F);
|
||||
|
||||
@@ -3,6 +3,7 @@ package tconstruct.items.blocks;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
@@ -12,9 +13,9 @@ public class WoolSlab2Item extends MultiItemBlock
|
||||
int blockID;
|
||||
Block block;
|
||||
|
||||
public WoolSlab2Item(int id)
|
||||
public WoolSlab2Item(Block b)
|
||||
{
|
||||
super(id, "", "slab" ,ItemDye.dyeColorNames);
|
||||
super(b, "", "slab" ,ItemDye.dyeColorNames);
|
||||
this.setSpecialIndex(7,7);
|
||||
this.blockID = id + 256;
|
||||
this.block = Block.blocksList[id + 256];
|
||||
@@ -33,7 +34,7 @@ public class WoolSlab2Item extends MultiItemBlock
|
||||
|
||||
if ((side == 1 && flag || side == 0 && !flag) && id == this.blockID && trueMeta == stack.getItemDamage())
|
||||
{
|
||||
if (world.setBlock(x, y, z, Block.cloth.blockID, trueMeta + 8, 3))
|
||||
if (world.setBlock(x, y, z, Blocks.wool.blockID, trueMeta + 8, 3))
|
||||
{
|
||||
world.playSoundEffect((double) ((float) x + 0.5F), (double) ((float) y + 0.5F), (double) ((float) z + 0.5F), this.block.stepSound.getPlaceSound(),
|
||||
(this.block.stepSound.getVolume() + 1.0F) / 2.0F, this.block.stepSound.getPitch() * 0.8F);
|
||||
|
||||
@@ -158,9 +158,9 @@ public class TConstructRegistry
|
||||
patternPartMapping.put(Arrays.asList(woodPattern, patternMeta, materialID), output);
|
||||
}
|
||||
|
||||
public static ItemStack getPartMapping (int itemID, int metadata, int materialID)
|
||||
public static ItemStack getPartMapping (Item item, int metadata, int materialID)
|
||||
{
|
||||
ItemStack stack = patternPartMapping.get(Arrays.asList(itemID, metadata, materialID));
|
||||
ItemStack stack = patternPartMapping.get(Arrays.asList(item, metadata, materialID));
|
||||
if (stack != null)
|
||||
return stack.copy();
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user