mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 11:29:23 +00:00
Start to work on ceramic blocks
This commit is contained in:
1 parent
4b6e3e5424
commit
9e68539431
28 files changed
+1009
-661
No files matched your search
@@ -1,16 +1,32 @@
|
||||
package binnie.botany.ceramic;
|
||||
|
||||
import binnie.core.block.ItemMetadata;
|
||||
import net.minecraft.block.Block;
|
||||
import binnie.botany.genetics.EnumFlowerColor;
|
||||
import forestry.core.items.IColoredItem;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemCeramic extends ItemMetadata {
|
||||
public ItemCeramic(final Block block) {
|
||||
public class ItemCeramic extends ItemBlock implements IColoredItem {
|
||||
public ItemCeramic(BlockCeramic block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(final int metadata) {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public int getColorFromItemStack(final ItemStack stack, final int p_82790_2_) {
|
||||
// return 16711935;
|
||||
// }
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getColorFromItemstack(ItemStack stack, int tintIndex) {
|
||||
return EnumFlowerColor.get(stack.getMetadata()).getColor(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getItemStackDisplayName(ItemStack itemStack) {
|
||||
return EnumFlowerColor.get(itemStack.getItemDamage()).getColourName() + " " + I18n.translateToLocal("tile.botany.ceramic.name").trim();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user