mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 20:12:19 +00:00
Fix #1467 Green House Camouflage Glitch
This commit is contained in:
1 parent
5e0e045053
commit
ac7fe4b2d2
14 files changed
+61
-49
No files matched your search
@@ -30,6 +30,7 @@ import forestry.apiculture.gui.widgets.HabitatSlot;
|
||||
import forestry.apiculture.inventory.ItemInventoryHabitatLocator;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.gui.GuiForestry;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.utils.Translator;
|
||||
|
||||
public class GuiHabitatLocator extends GuiForestry<ContainerHabitatLocator, ItemInventoryHabitatLocator> {
|
||||
@@ -85,7 +86,7 @@ public class GuiHabitatLocator extends GuiForestry<ContainerHabitatLocator, Item
|
||||
super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
|
||||
|
||||
String str = Translator.translateToLocal("item.for.habitatLocator.name").toUpperCase();
|
||||
fontRendererObj.drawString(str, startX + 8 + textLayout.getCenteredOffset(str, 138), startY + 16, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawString(str, startX + 8 + textLayout.getCenteredOffset(str, 138), startY + 16, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
|
||||
// Set active according to valid biomes.
|
||||
Set<BiomeDictionary.Type> activeBiomeTypes = EnumSet.noneOf(BiomeDictionary.Type.class);
|
||||
|
||||
@@ -28,6 +28,7 @@ import forestry.core.gui.GuiForestry;
|
||||
import forestry.core.gui.GuiUtil;
|
||||
import forestry.core.network.packets.PacketGuiSelectRequest;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.utils.Translator;
|
||||
|
||||
public class GuiImprinter extends GuiForestry<ContainerImprinter, ItemInventoryImprinter> {
|
||||
@@ -58,19 +59,19 @@ public class GuiImprinter extends GuiForestry<ContainerImprinter, ItemInventoryI
|
||||
super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
|
||||
|
||||
int offset = (138 - fontRendererObj.getStringWidth(Translator.translateToLocal("for.gui.imprinter.name"))) / 2;
|
||||
fontRendererObj.drawString(Translator.translateToLocal("for.gui.imprinter.name"), startX + 8 + offset, startY + 16, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawString(Translator.translateToLocal("for.gui.imprinter.name"), startX + 8 + offset, startY + 16, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
|
||||
IAlleleBeeSpecies primary = inventory.getPrimary();
|
||||
drawBeeSpeciesIcon(primary, startX + 12, startY + 32);
|
||||
fontRendererObj.drawString(primary.getName(), startX + 32, startY + 36, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawString(primary.getName(), startX + 32, startY + 36, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
|
||||
IAlleleBeeSpecies secondary = inventory.getSecondary();
|
||||
drawBeeSpeciesIcon(secondary, startX + 12, startY + 52);
|
||||
fontRendererObj.drawString(secondary.getName(), startX + 32, startY + 56, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawString(secondary.getName(), startX + 32, startY + 56, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
|
||||
String youCheater = Translator.translateToLocal("for.gui.imprinter.cheater");
|
||||
offset = (138 - fontRendererObj.getStringWidth(youCheater)) / 2;
|
||||
fontRendererObj.drawString(youCheater, startX + 8 + offset, startY + 76, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawString(youCheater, startX + 8 + offset, startY + 76, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ import forestry.core.network.PacketRegistryCore;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.recipes.RecipeUtil;
|
||||
import forestry.core.recipes.ShapedRecipeCustom;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.render.TextureManager;
|
||||
import forestry.core.utils.ClimateUtil;
|
||||
import forestry.core.utils.ForestryModEnvWarningCallable;
|
||||
@@ -129,6 +130,8 @@ public class PluginCore extends BlankForestryPlugin {
|
||||
super.preInit();
|
||||
|
||||
GameProfileDataSerializer.register();
|
||||
//load colour properties
|
||||
ColourProperties.INSTANCE.getClass();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import forestry.api.farming.FarmDirection;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.gui.GuiForestry;
|
||||
import forestry.core.inventory.ItemInventorySolderingIron;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.utils.Translator;
|
||||
|
||||
public class GuiSolderingIron extends GuiForestry<ContainerSolderingIron, ItemInventorySolderingIron> {
|
||||
@@ -41,7 +42,7 @@ public class GuiSolderingIron extends GuiForestry<ContainerSolderingIron, ItemIn
|
||||
|
||||
ICircuitLayout layout = ((ContainerSolderingIron) inventorySlots).getLayout();
|
||||
String title = layout.getName();
|
||||
fontRendererObj.drawString(title, guiLeft + 8 + textLayout.getCenteredOffset(title, 138), guiTop + 16, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawString(title, guiLeft + 8 + textLayout.getCenteredOffset(title, 138), guiTop + 16, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
String description;
|
||||
@@ -54,7 +55,7 @@ public class GuiSolderingIron extends GuiForestry<ContainerSolderingIron, ItemIn
|
||||
}
|
||||
|
||||
int row = i * 20;
|
||||
fontRendererObj.drawString(description, guiLeft + 32, guiTop + 36 + row, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawString(description, guiLeft + 32, guiTop + 36 + row, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
|
||||
if (tube == null) {
|
||||
ICircuitSocketType socketType = layout.getSocketType();
|
||||
@@ -62,7 +63,7 @@ public class GuiSolderingIron extends GuiForestry<ContainerSolderingIron, ItemIn
|
||||
FarmDirection farmDirection = FarmDirection.values()[i];
|
||||
String farmDirectionString = farmDirection.toString().toLowerCase(Locale.ENGLISH);
|
||||
String localizedDirection = Translator.translateToLocal("for.gui.solder." + farmDirectionString);
|
||||
fontRendererObj.drawString(localizedDirection, guiLeft + 17, guiTop + 36 + row, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawString(localizedDirection, guiLeft + 17, guiTop + 36 + row, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ import forestry.core.gui.widgets.ItemStackWidget;
|
||||
import forestry.core.gui.widgets.WidgetManager;
|
||||
import forestry.core.inventory.ItemInventoryAlyzer;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.utils.Translator;
|
||||
|
||||
public class GuiAlyzer extends GuiForestry<ContainerAlyzer, IInventory> {
|
||||
@@ -60,9 +61,9 @@ public class GuiAlyzer extends GuiForestry<ContainerAlyzer, IInventory> {
|
||||
|
||||
public final int getColorCoding(boolean dominant) {
|
||||
if (dominant) {
|
||||
return fontColor.get("gui.beealyzer.dominant");
|
||||
return ColourProperties.INSTANCE.get("gui.beealyzer.dominant");
|
||||
} else {
|
||||
return fontColor.get("gui.beealyzer.recessive");
|
||||
return ColourProperties.INSTANCE.get("gui.beealyzer.recessive");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +84,7 @@ public class GuiAlyzer extends GuiForestry<ContainerAlyzer, IInventory> {
|
||||
}
|
||||
|
||||
public final void drawRow(String text0, String text1, String text2, IIndividual individual, IChromosomeType chromosome) {
|
||||
textLayout.drawRow(text0, text1, text2, fontColor.get("gui.screen"), getColorCoding(individual.getGenome().getActiveAllele(chromosome).isDominant()),
|
||||
textLayout.drawRow(text0, text1, text2, ColourProperties.INSTANCE.get("gui.screen"), getColorCoding(individual.getGenome().getActiveAllele(chromosome).isDominant()),
|
||||
getColorCoding(individual.getGenome().getInactiveAllele(chromosome).isDominant()));
|
||||
}
|
||||
|
||||
@@ -91,7 +92,7 @@ public class GuiAlyzer extends GuiForestry<ContainerAlyzer, IInventory> {
|
||||
IAllele active = individual.getGenome().getActiveAllele(chromosome);
|
||||
IAllele inactive = individual.getGenome().getInactiveAllele(chromosome);
|
||||
textLayout.drawRow(chromosomeName, active.getName(), inactive.getName(),
|
||||
fontColor.get("gui.screen"), getColorCoding(active.isDominant()),
|
||||
ColourProperties.INSTANCE.get("gui.screen"), getColorCoding(active.isDominant()),
|
||||
getColorCoding(inactive.isDominant()));
|
||||
}
|
||||
|
||||
@@ -195,10 +196,10 @@ public class GuiAlyzer extends GuiForestry<ContainerAlyzer, IInventory> {
|
||||
|
||||
textLayout.newLine();
|
||||
String title = Translator.translateToLocal("for.gui.portablealyzer").toUpperCase();
|
||||
textLayout.drawCenteredLine(title, 8, 208, fontColor.get("gui.screen"));
|
||||
textLayout.drawCenteredLine(title, 8, 208, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
textLayout.newLine();
|
||||
|
||||
fontRendererObj.drawSplitString(Translator.translateToLocal("for.gui.portablealyzer.help"), guiLeft + COLUMN_0 + 4, guiTop + 42, 200, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawSplitString(Translator.translateToLocal("for.gui.portablealyzer.help"), guiLeft + COLUMN_0 + 4, guiTop + 42, 200, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
textLayout.newLine();
|
||||
textLayout.newLine();
|
||||
textLayout.newLine();
|
||||
@@ -265,7 +266,7 @@ public class GuiAlyzer extends GuiForestry<ContainerAlyzer, IInventory> {
|
||||
if (AlleleManager.alleleRegistry.isBlacklisted(individual.getIdent())) {
|
||||
String extinct = ">> " + Translator.translateToLocal("for.gui.alyzer.extinct").toUpperCase() + " <<";
|
||||
fontRendererObj.drawStringWithShadow(extinct, guiLeft + 200 - fontRendererObj.getStringWidth(extinct),
|
||||
guiTop + textLayout.getLineY(), fontColor.get("gui.beealyzer.dominant"));
|
||||
guiTop + textLayout.getLineY(), ColourProperties.INSTANCE.get("gui.beealyzer.dominant"));
|
||||
}
|
||||
|
||||
textLayout.newLine();
|
||||
|
||||
@@ -26,7 +26,7 @@ import forestry.core.gui.ledgers.PowerLedger;
|
||||
import forestry.core.gui.widgets.WidgetManager;
|
||||
import forestry.core.owner.IOwnedTile;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.render.FontColour;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.render.ForestryResource;
|
||||
import forestry.core.tiles.IClimatised;
|
||||
import forestry.core.tiles.IPowerHandler;
|
||||
@@ -49,7 +49,6 @@ public abstract class GuiForestry<C extends Container, I extends IInventory> ext
|
||||
protected final WidgetManager widgetManager;
|
||||
protected LedgerManager ledgerManager;
|
||||
protected TextLayoutHelper textLayout;
|
||||
protected FontColour fontColor;
|
||||
|
||||
protected GuiForestry(String texture, C container, I inventory) {
|
||||
this(new ForestryResource(texture), container, inventory);
|
||||
@@ -65,8 +64,7 @@ public abstract class GuiForestry<C extends Container, I extends IInventory> ext
|
||||
this.inventory = inventory;
|
||||
this.container = container;
|
||||
|
||||
this.fontColor = new FontColour(Proxies.render.getSelectedTexturePack());
|
||||
this.textLayout = new TextLayoutHelper(this, this.fontColor);
|
||||
this.textLayout = new TextLayoutHelper(this, ColourProperties.INSTANCE);
|
||||
}
|
||||
|
||||
/* LEDGERS */
|
||||
@@ -122,8 +120,8 @@ public abstract class GuiForestry<C extends Container, I extends IInventory> ext
|
||||
ledgerManager.onGuiClosed();
|
||||
}
|
||||
|
||||
public FontColour getFontColor() {
|
||||
return fontColor;
|
||||
public ColourProperties getFontColor() {
|
||||
return ColourProperties.INSTANCE;
|
||||
}
|
||||
|
||||
public FontRenderer getFontRenderer() {
|
||||
|
||||
@@ -12,7 +12,7 @@ package forestry.core.gui;
|
||||
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.tiles.ITitled;
|
||||
import forestry.core.utils.Translator;
|
||||
|
||||
@@ -28,7 +28,7 @@ public abstract class GuiForestryTitled<C extends Container, I extends ITitled &
|
||||
|
||||
String name = Translator.translateToLocal(inventory.getUnlocalizedTitle());
|
||||
textLayout.line = 6;
|
||||
textLayout.drawCenteredLine(name, 0, fontColor.get("gui.title"));
|
||||
textLayout.drawCenteredLine(name, 0, ColourProperties.INSTANCE.get("gui.title"));
|
||||
bindTexture(textureFile);
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ package forestry.core.gui;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
import forestry.core.render.FontColour;
|
||||
import forestry.core.render.ColourProperties;
|
||||
|
||||
public class TextLayoutHelper {
|
||||
private static final int LINE_HEIGHT = 12;
|
||||
@@ -25,7 +25,7 @@ public class TextLayoutHelper {
|
||||
public int column2;
|
||||
public int line;
|
||||
|
||||
public TextLayoutHelper(GuiForestry guiForestry, FontColour fontColour) {
|
||||
public TextLayoutHelper(GuiForestry guiForestry, ColourProperties fontColour) {
|
||||
this.guiForestry = guiForestry;
|
||||
this.defaultFontColor = fontColour.get("gui.screen");
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class WidgetCamouflageSlot extends Widget {
|
||||
return;
|
||||
}
|
||||
if (GuiScreen.isShiftKeyDown()) {
|
||||
camouflageHandler.setCamouflageBlock(type, camouflageHandler.getDefaultCamouflageBlock(type), false);
|
||||
camouflageHandler.setCamouflageBlock(type, camouflageHandler.getDefaultCamouflageBlock(type), true);
|
||||
} else {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
ItemStack stack = player.inventory.getItemStack();
|
||||
@@ -64,7 +64,7 @@ public class WidgetCamouflageSlot extends Widget {
|
||||
if (!CamouflageManager.camouflageAccess.isItemBlackListed(type, stack)) {
|
||||
for(ICamouflageItemHandler handler : CamouflageManager.camouflageAccess.getCamouflageItemHandler(type)){
|
||||
if(handler != null && handler.canHandle(stack)){
|
||||
camouflageHandler.setCamouflageBlock(handler.getType(), stack.copy(), false);
|
||||
camouflageHandler.setCamouflageBlock(handler.getType(), stack.copy(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+17
-14
@@ -14,40 +14,43 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.IReloadableResourceManager;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
|
||||
import net.minecraft.client.resources.IResourceManagerReloadListener;
|
||||
import net.minecraftforge.client.model.ModelLoaderRegistry;
|
||||
import forestry.core.utils.Log;
|
||||
|
||||
public class FontColour {
|
||||
|
||||
//private static final ResourceLocation colourDefinitions = new ForestryResource("/config/forestry/colour.properties");
|
||||
public class ColourProperties implements IResourceManagerReloadListener {
|
||||
|
||||
public static final ColourProperties INSTANCE;
|
||||
|
||||
static{
|
||||
INSTANCE = new ColourProperties();
|
||||
}
|
||||
|
||||
private final Properties defaultMappings = new Properties();
|
||||
private final Properties mappings = new Properties();
|
||||
|
||||
public FontColour(IResourceManager texturepack) {
|
||||
load(texturepack);
|
||||
private ColourProperties() {
|
||||
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(this);
|
||||
}
|
||||
|
||||
public synchronized int get(String key) {
|
||||
return Integer.parseInt(mappings.getProperty(key, defaultMappings.getProperty(key, "d67fff")), 16);
|
||||
}
|
||||
|
||||
public void load(IResourceManager texturepack) {
|
||||
@Override
|
||||
public void onResourceManagerReload(IResourceManager resourceManager) {
|
||||
try {
|
||||
//InputStream fontStream = texturepack.func_110536_a(colourDefinitions).func_110527_b();
|
||||
InputStream defaultFontStream = FontColour.class.getResourceAsStream("/config/forestry/colour.properties");
|
||||
//mappings.load((fontStream == null) ? defaultFontStream : fontStream);
|
||||
InputStream defaultFontStream = ColourProperties.class.getResourceAsStream("/config/forestry/colour.properties");
|
||||
mappings.load(defaultFontStream);
|
||||
defaultMappings.load(defaultFontStream);
|
||||
|
||||
//if (fontStream != null)
|
||||
// fontStream.close();
|
||||
defaultFontStream.close();
|
||||
} catch (IOException e) {
|
||||
Log.error("Failed to load font colors.", e);
|
||||
Log.error("Failed to load colors.properties.", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
import forestry.api.food.BeverageManager;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.gui.GuiForestry;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.food.inventory.ItemInventoryInfuser;
|
||||
|
||||
public class GuiInfuser extends GuiForestry<ContainerInfuser, ItemInventoryInfuser> {
|
||||
@@ -40,7 +41,7 @@ public class GuiInfuser extends GuiForestry<ContainerInfuser, ItemInventoryInfus
|
||||
}
|
||||
|
||||
int row = (l - 2) * 20;
|
||||
fontRendererObj.drawString(description, startX + 32, startY + 16 + row, fontColor.get("gui.screen"));
|
||||
fontRendererObj.drawString(description, startX + 32, startY + 16 + row, ColourProperties.INSTANCE.get("gui.screen"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import forestry.core.gui.widgets.TankWidget;
|
||||
import forestry.core.gui.widgets.WidgetCamouflageSlot;
|
||||
import forestry.core.network.packets.PacketUpdateClimateControl;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.render.TextureManager;
|
||||
import forestry.core.utils.Translator;
|
||||
import forestry.greenhouse.multiblock.DefaultClimateControl;
|
||||
@@ -154,12 +155,12 @@ public class GuiGreenhouse extends GuiForestryTitled<ContainerGreenhouse, TileGr
|
||||
|
||||
if(temperatureField.getVisible()){
|
||||
textLayout.line = 20;
|
||||
textLayout.drawCenteredLine(Translator.translateToLocal("for.gui.temperature"), 0, fontColor.get("gui.greenhouse.temperature.text"));
|
||||
textLayout.drawCenteredLine(Translator.translateToLocal("for.gui.temperature"), 0, ColourProperties.INSTANCE.get("gui.greenhouse.temperature.text"));
|
||||
temperatureField.drawTextBox();
|
||||
}
|
||||
if(humidityField.getVisible()){
|
||||
textLayout.line = 50;
|
||||
textLayout.drawCenteredLine(Translator.translateToLocal("for.gui.humidity"), 0, fontColor.get("gui.greenhouse.humidity.text"));
|
||||
textLayout.drawCenteredLine(Translator.translateToLocal("for.gui.humidity"), 0, ColourProperties.INSTANCE.get("gui.greenhouse.humidity.text"));
|
||||
|
||||
humidityField.drawTextBox();
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.lwjgl.input.Keyboard;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.gui.GuiForestry;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.utils.Translator;
|
||||
import forestry.mail.network.packets.PacketTraderAddressRequest;
|
||||
import forestry.mail.tiles.TileTrader;
|
||||
@@ -75,7 +76,7 @@ public class GuiTradeName extends GuiForestry<ContainerTradeName, TileTrader> {
|
||||
String prompt = Translator.translateToLocal("for.gui.mail.nametrader");
|
||||
textLayout.startPage();
|
||||
textLayout.newLine();
|
||||
textLayout.drawCenteredLine(prompt, 0, fontColor.get("gui.mail.text"));
|
||||
textLayout.drawCenteredLine(prompt, 0, ColourProperties.INSTANCE.get("gui.mail.text"));
|
||||
textLayout.endPage();
|
||||
addressNameField.drawTextBox();
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.gui.GuiForestry;
|
||||
import forestry.core.render.ColourProperties;
|
||||
import forestry.core.utils.Translator;
|
||||
import forestry.mail.tiles.TileTrader;
|
||||
|
||||
@@ -28,13 +29,13 @@ public class GuiTrader extends GuiForestry<ContainerTrader, TileTrader> {
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||
String name = Translator.translateToLocal(inventory.getUnlocalizedTitle());
|
||||
this.fontRendererObj.drawString(name, textLayout.getCenteredOffset(name), 6, fontColor.get("gui.mail.text"));
|
||||
this.fontRendererObj.drawString(name, textLayout.getCenteredOffset(name), 6, ColourProperties.INSTANCE.get("gui.mail.text"));
|
||||
|
||||
String receive = Translator.translateToLocal("for.gui.mail.receive");
|
||||
this.fontRendererObj.drawString(receive, textLayout.getCenteredOffset(receive, 70) + 51, 45, fontColor.get("gui.mail.text"));
|
||||
this.fontRendererObj.drawString(receive, textLayout.getCenteredOffset(receive, 70) + 51, 45, ColourProperties.INSTANCE.get("gui.mail.text"));
|
||||
|
||||
String send = Translator.translateToLocal("for.gui.mail.send");
|
||||
this.fontRendererObj.drawString(send, textLayout.getCenteredOffset(send, 70) + 51, 99, fontColor.get("gui.mail.text"));
|
||||
this.fontRendererObj.drawString(send, textLayout.getCenteredOffset(send, 70) + 51, 99, ColourProperties.INSTANCE.get("gui.mail.text"));
|
||||
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
}
|
||||
@@ -43,6 +44,6 @@ public class GuiTrader extends GuiForestry<ContainerTrader, TileTrader> {
|
||||
protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
|
||||
|
||||
fontRendererObj.drawString(container.getAddress().getName(), guiLeft + 19, guiTop + 22, fontColor.get("gui.mail.text"));
|
||||
fontRendererObj.drawString(container.getAddress().getName(), guiLeft + 19, guiTop + 22, ColourProperties.INSTANCE.get("gui.mail.text"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user