Made treasure chest names translatable.

This commit is contained in:
bconlon 2020-06-19 08:29:07 -07:00
parent 9c9efc46b4
commit 00e3c2e252
2 changed files with 11 additions and 5 deletions

View file

@ -1,6 +1,7 @@
package com.legacy.aether.client.gui;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ContainerChest;
import net.minecraft.util.ResourceLocation;
@ -30,13 +31,13 @@ public class GuiTreasureChest extends GuiContainer {
this.ySize = 114 + this.inventoryRows * 18;
if (chestInventory.getKind() == 0) {
this.chestType = "Bronze Treasure Chest";
this.chestType = I18n.format("gui.treasure_chest.bronze");
} else if (chestInventory.getKind() == 1) {
this.chestType = "Silver Treasure Chest";
this.chestType = I18n.format("gui.treasure_chest.silver");
} else if (chestInventory.getKind() == 2) {
this.chestType = "Gold Treasure Chest";
this.chestType = I18n.format("gui.treasure_chest.gold");
} else {
this.chestType = "Platinum Treasure Chest";
this.chestType = I18n.format("gui.treasure_chest.platinum");
}
}

View file

@ -395,4 +395,9 @@ death.attack.inebriation=%1$s was inebriated by Cockatrice
gui.sun_altar.message=The sun spirit has no power over this realm.
gui.loading.enteraether=Ascending to the Aether
gui.loading.exitaether=Descending from the Aether
gui.loading.exitaether=Descending from the Aether
gui.treasure_chest.bronze=Bronze Treasure Chest
gui.treasure_chest.silver=Silver Treasure Chest
gui.treasure_chest.gold=Gold Treasure Chest
gui.treasure_chest.platinum=Platinum Treasure Chest