mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-10-25 20:22:33 +00:00
Cache slab unlocalized name (#152)
This commit is contained in:
1 parent
8e709b0190
commit
abd62c1076
1 file changed
+3
-1
@@ -21,14 +21,16 @@ import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBlockModSlab extends ItemSlab {
|
||||
private final String unlocalizedName;
|
||||
|
||||
public ItemBlockModSlab(Block blockSlab) {
|
||||
super(blockSlab, ((BlockModSlab)blockSlab).getSingleBlock(), ((BlockModSlab)blockSlab).getFullBlock(), false);
|
||||
unlocalizedName = blockSlab.getUnlocalizedName().replace("tile.", "tile.botania:");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return field_150939_a.getUnlocalizedName().replaceAll("tile.", "tile.botania:");
|
||||
return unlocalizedName;
|
||||
}
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> infoList, boolean advanced) {
|
||||
|
||||
Reference in new issue
Block a user