Added config to switch the Altar's name to Enchanter.
This commit is contained in:
parent
694c736a8d
commit
1c39fde6c3
|
@ -25,6 +25,8 @@ public class AetherConfig {
|
|||
|
||||
private static boolean menu_enabled, menu_button, install_resourcepack;
|
||||
|
||||
private static boolean legacy_altar_name;
|
||||
|
||||
public static void init(File location) {
|
||||
File newFile = new File(location + "/aether" + "/AetherI.cfg");
|
||||
|
||||
|
@ -60,6 +62,8 @@ public class AetherConfig {
|
|||
|
||||
install_resourcepack = config.get("Misc", "Determines whether the Aether b1.7.3 resource pack should be generated.", true).getBoolean(true);
|
||||
|
||||
legacy_altar_name = config.get("Misc", "Changes whether the Altar should be named Enchanter or not.", false).getBoolean(false);
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
|
@ -122,4 +126,8 @@ public class AetherConfig {
|
|||
{
|
||||
return AetherConfig.install_resourcepack;
|
||||
}
|
||||
|
||||
public static boolean legacyAltarName() {
|
||||
return AetherConfig.legacy_altar_name;
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@ package com.legacy.aether.blocks;
|
|||
|
||||
import com.legacy.aether.items.ItemSkyrootBed;
|
||||
import com.legacy.aether.items.ItemsAether;
|
||||
import com.legacy.aether.items.block.ItemBlockEnchanter;
|
||||
import com.legacy.aether.items.block.ItemBlockRarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -148,7 +149,7 @@ public class BlocksAether {
|
|||
white_flower = register("white_flower", new BlockAetherFlower().setBlockTextureName(Aether.find("white_flower")));
|
||||
skyroot_sapling = register("skyroot_sapling", new BlockAetherSapling(new AetherGenSkyrootTree(false)).setBlockTextureName(Aether.find("skyroot_sapling")));
|
||||
golden_oak_sapling = register("golden_oak_sapling", new BlockAetherSapling(new AetherGenOakTree()).setBlockTextureName(Aether.find("golden_oak_sapling")));
|
||||
enchanter = registerMeta("enchanter", new BlockEnchanter());
|
||||
enchanter = registerEnchanter("enchanter", new BlockEnchanter());
|
||||
freezer = registerMeta("freezer", new BlockFreezer());
|
||||
incubator = registerMeta("incubator", new BlockIncubator());
|
||||
sun_altar = register("sun_altar", new BlockSunAltar());
|
||||
|
@ -257,4 +258,13 @@ public class BlocksAether {
|
|||
return block;
|
||||
}
|
||||
|
||||
public static Block registerEnchanter(String name, Block block) {
|
||||
block.setBlockName(name);
|
||||
block.setCreativeTab(AetherCreativeTabs.blocks);
|
||||
|
||||
GameRegistry.registerBlock(block, ItemBlockEnchanter.class, name);
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.legacy.aether.client.gui;
|
||||
|
||||
import com.legacy.aether.AetherConfig;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
@ -28,7 +29,9 @@ public class GuiEnchanter extends GuiContainer {
|
|||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
String enchanterName = this.enchanter.getInventoryName();
|
||||
String enchanterName = AetherConfig.legacyAltarName() ?
|
||||
I18n.format("container.aether_legacy.enchanter")
|
||||
: I18n.format("container.aether_legacy.altar");
|
||||
|
||||
this.fontRendererObj.drawString(enchanterName, this.xSize / 2 - this.fontRendererObj.getStringWidth(enchanterName) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package com.legacy.aether.items.block;
|
||||
|
||||
import com.legacy.aether.AetherConfig;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBlockEnchanter extends ItemBlockMetadata
|
||||
{
|
||||
public ItemBlockEnchanter(Block block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack p_77667_1_)
|
||||
{
|
||||
return AetherConfig.legacyAltarName() ? "tile.enchanter" : "tile.altar";
|
||||
}
|
||||
|
||||
public String getUnlocalizedName()
|
||||
{
|
||||
return AetherConfig.legacyAltarName() ? "tile.enchanter" : "tile.altar";
|
||||
}
|
||||
}
|
|
@ -187,7 +187,8 @@ tile.quicksoil_glass.name=Quicksoil Glass
|
|||
tile.aerogel.name=Aerogel
|
||||
tile.icestone.name=Icestone
|
||||
tile.treasure_chest.name=Treasure Chest
|
||||
tile.enchanter.name=Altar
|
||||
tile.enchanter.name=Enchanter
|
||||
tile.altar.name=Altar
|
||||
tile.incubator.name=Incubator
|
||||
tile.chest_mimic.name=Chest Mimic
|
||||
tile.freezer.name=Freezer
|
||||
|
@ -299,6 +300,7 @@ death.attack.aether_legacy.poison=%s was inebriated
|
|||
|
||||
# Containers
|
||||
container.aether_legacy.incubator=Incubator
|
||||
container.aether_legacy.enchanter=Enchanter
|
||||
container.aether_legacy.altar=Altar
|
||||
container.aether_legacy.freezer=Freezer
|
||||
|
||||
|
|
Loading…
Reference in a new issue