mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-26 06:43:05 +00:00
Fix hive item names
This commit is contained in:
1 parent
8fea137a8b
commit
7924e9fa83
2 files changed
+8
-1
No files matched your search
@@ -23,6 +23,8 @@ public interface IHiveRegistry {
|
||||
SNOW("Forestry:snow"),
|
||||
SWAMP("Forestry:swamp");
|
||||
|
||||
public static final HiveType[] VALUES = values();
|
||||
|
||||
HiveType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.apiculture.hives.IHiveRegistry.HiveType;
|
||||
import forestry.apiculture.blocks.BlockBeehives;
|
||||
import forestry.core.blocks.BlockBase;
|
||||
import forestry.core.tiles.TileForestry;
|
||||
import forestry.core.tiles.TileUtil;
|
||||
@@ -49,6 +50,10 @@ public class ItemBlockForestry<B extends Block> extends ItemBlock {
|
||||
BlockBase<?> blockBase = (BlockBase) block;
|
||||
int meta = itemstack.getMetadata();
|
||||
return block.getUnlocalizedName() + "." + blockBase.getNameFromMeta(meta);
|
||||
}else if(block instanceof BlockBeehives){
|
||||
BlockBeehives blockHives = (BlockBeehives) block;
|
||||
int meta = itemstack.getMetadata();
|
||||
return block.getUnlocalizedName() + "." + HiveType.VALUES[meta - 1].getName();
|
||||
}
|
||||
return block.getUnlocalizedName();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user