mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-27 15:22:57 +00:00
Add honey comb blocks and improve greenhouse nursery
This commit is contained in:
1 parent
81ef5d536f
commit
ca7d6dbc66
31 files changed
+558
-30
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package forestry.apiculture.items;
|
||||
|
||||
import forestry.apiculture.blocks.BlockHoneyComb;
|
||||
import forestry.core.items.IColoredItem;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBlockHoneyComb extends ItemBlockForestry<BlockHoneyComb> implements IColoredItem {
|
||||
|
||||
public ItemBlockHoneyComb(Block block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getColorFromItemstack(ItemStack stack, int tintIndex) {
|
||||
int meta = stack.getMetadata();
|
||||
EnumHoneyComb honeyComb = EnumHoneyComb.get(getBlock().minMeta + meta);
|
||||
if (tintIndex == 1) {
|
||||
return honeyComb.primaryColor;
|
||||
} else {
|
||||
return honeyComb.secondaryColor;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user