mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
Add back wool slabs
This commit is contained in:
1 parent
34ef094351
commit
70c66ac29a
5 files changed
+37
-15
No files matched your search
@@ -1,12 +1,13 @@
|
||||
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.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class WoolSlab1Item extends MultiItemBlock
|
||||
{
|
||||
@@ -20,6 +21,13 @@ public class WoolSlab1Item extends MultiItemBlock
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName (ItemStack par1ItemStack)
|
||||
{
|
||||
int i = MathHelper.clamp_int(par1ItemStack.getItemDamage(), 0, 7);
|
||||
return super.getUnlocalizedName() + "." + ItemDye.field_150923_a[7 - i] + ".slab";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
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.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import mantle.blocks.abstracts.MultiItemBlock;
|
||||
|
||||
public class WoolSlab2Item extends MultiItemBlock
|
||||
{
|
||||
@@ -15,11 +16,24 @@ public class WoolSlab2Item extends MultiItemBlock
|
||||
public WoolSlab2Item(Block b)
|
||||
{
|
||||
super(b, "", "slab", ItemDye.field_150923_a);
|
||||
this.setSpecialIndex(7, 7);
|
||||
this.setSpecialIndex(0, 7);
|
||||
this.block = b;
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata (int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName (ItemStack par1ItemStack)
|
||||
{
|
||||
int i = MathHelper.clamp_int(par1ItemStack.getItemDamage(), 7, 15);
|
||||
return super.getUnlocalizedName() + "." + ItemDye.field_150923_a[15 - i] + ".slab";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
|
||||
Reference in new issue
Block a user