mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-18 19:39:12 +00:00
part 2 of conversion to multiItemBlock
This commit is contained in:
1 parent
2ed4c115e4
commit
51e0833ae8
24 files changed
+93
-335
No files matched your search
@@ -1,33 +1,17 @@
|
||||
package tconstruct.items.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class SlimeSaplingItemBlock extends ItemBlock
|
||||
public class SlimeSaplingItemBlock extends MultiItemBlock
|
||||
{
|
||||
public static final String blockType[] = { "bluegreen" };
|
||||
public static final String blockTypes[] = { "bluegreen" };
|
||||
|
||||
public SlimeSaplingItemBlock(int id)
|
||||
{
|
||||
super(id);
|
||||
super(id, "block.slime.sapling", blockTypes);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public int getMetadata (int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
public String getUnlocalizedName (ItemStack itemstack)
|
||||
{
|
||||
int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
|
||||
return (new StringBuilder()).append("block.slime.sapling.").append(blockType[pos]).toString();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user