Refactoring for translation

This commit is contained in:
drcrazy 2017-09-08 02:03:35 +03:00
parent 8a8205b4b1
commit ab1802ba5e
48 changed files with 240 additions and 118 deletions

View file

@ -44,6 +44,7 @@ import techreborn.tiles.multiblock.*;
import techreborn.tiles.storage.TileHighVoltageSU;
import techreborn.tiles.storage.TileLowVoltageSU;
import techreborn.tiles.storage.TileMediumVoltageSU;
import techreborn.tiles.storage.TileAdjustableSU;
import techreborn.tiles.teir1.*;
public class GuiHandler implements IGuiHandler {

View file

@ -177,7 +177,7 @@ public class RegisterItemJsons {
});
}
public static void setBlockStateMapper(Block block, String path, IProperty... ignoredProperties) {
public static void setBlockStateMapper(Block block, String path, IProperty<?>... ignoredProperties) {
final String slash = !path.isEmpty() ? "/" : "";
ModelLoader.setCustomStateMapper(block, new DefaultStateMapper() {
@Override
@ -204,6 +204,7 @@ public class RegisterItemJsons {
register(item, 0, name);
}
@SuppressWarnings("unused")
private static void register(Block block, int meta, String name) {
register(Item.getItemFromBlock(block), meta, name);
}
@ -212,6 +213,7 @@ public class RegisterItemJsons {
register(Item.getItemFromBlock(block), 0, name);
}
@SuppressWarnings("unused")
private static void registerBlockstate(Item i, int meta, String variant) {
registerBlockstate(i, meta, variant, "");
}
@ -221,6 +223,7 @@ public class RegisterItemJsons {
ModelLoader.setCustomModelResourceLocation(i, meta, new ModelResourceLocation(loc, "type=" + variant));
}
@SuppressWarnings("unused")
private static void registerBlockstate(Block i, int meta, String variant) {
registerBlockstate(i, meta, variant, "");
}

View file

@ -30,7 +30,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.client.gui.slots.BaseSlot;
import reborncore.common.container.RebornContainer;
import techreborn.tiles.TileAdjustableSU;
import techreborn.tiles.storage.TileAdjustableSU;
public class ContainerAESU extends RebornContainer {

View file

@ -29,12 +29,12 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import reborncore.common.network.NetworkManager;
import reborncore.common.powerSystem.PowerSystem;
import techreborn.client.container.ContainerAESU;
import techreborn.packets.PacketAesu;
import techreborn.tiles.TileAdjustableSU;
import techreborn.tiles.storage.TileAdjustableSU;
import java.awt.*;
import java.io.IOException;
@ -78,7 +78,7 @@ public class GuiAESU extends GuiContainer {
}
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
this.fontRenderer.drawString(I18n.translateToLocal("tile.techreborn:adjustable_su.name"), 40, 10,
this.fontRenderer.drawString(I18n.format("tile.techreborn:adjustable_su.name"), 40, 10,
Color.WHITE.getRGB());
this.fontRenderer.drawString(PowerSystem.getLocaliszedPower(containerAesu.euOut) + " /tick", 10, 20,
Color.WHITE.getRGB());

View file

@ -28,7 +28,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import techreborn.tiles.TileIronAlloyFurnace;
public class GuiAlloyFurnace extends GuiContainer {
@ -47,8 +47,6 @@ public class GuiAlloyFurnace extends GuiContainer {
@Override
public void initGui() {
final int k = (this.width - this.xSize) / 2;
final int l = (this.height - this.ySize) / 2;
super.initGui();
}
@ -71,10 +69,10 @@ public class GuiAlloyFurnace extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:iron_alloy_furnace.name");
final String name = I18n.format("tile.techreborn:iron_alloy_furnace.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
}

View file

@ -28,8 +28,8 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import techreborn.tiles.TileAlloySmelter;
import net.minecraft.client.resources.I18n;
import techreborn.tiles.teir1.TileAlloySmelter;
public class GuiAlloySmelter extends GuiContainer {
@ -47,8 +47,6 @@ public class GuiAlloySmelter extends GuiContainer {
@Override
public void initGui() {
final int k = (this.width - this.xSize) / 2;
final int l = (this.height - this.ySize) / 2;
super.initGui();
}
@ -76,10 +74,10 @@ public class GuiAlloySmelter extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:alloy_smelter.name");
final String name = I18n.format("tile.techreborn:alloy_smelter.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
}

View file

@ -28,7 +28,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import techreborn.tiles.TileAssemblingMachine;
public class GuiAssemblingMachine extends GuiContainer {
@ -47,8 +47,6 @@ public class GuiAssemblingMachine extends GuiContainer {
@Override
public void initGui() {
final int k = (this.width - this.xSize) / 2;
final int l = (this.height - this.ySize) / 2;
super.initGui();
}
@ -76,10 +74,10 @@ public class GuiAssemblingMachine extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:assembly_machine.name");
final String name = I18n.format("tile.techreborn:assembly_machine.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
}

View file

@ -28,7 +28,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import reborncore.api.tile.IUpgradeable;
@ -145,7 +145,7 @@ public class GuiBase extends GuiContainer {
}
protected void drawTitle() {
drawCentredString(I18n.translateToLocal(tile.getBlockType().getUnlocalizedName() + ".name"), 6, 4210752, Layer.FOREGROUND);
drawCentredString(I18n.format(tile.getBlockType().getUnlocalizedName() + ".name"), 6, 4210752, Layer.FOREGROUND);
}
protected void drawCentredString(String string, int y, int colour, Layer layer) {

View file

@ -29,7 +29,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import techreborn.tiles.TileChunkLoader;
public class GuiChunkLoader extends GuiContainer {
@ -78,10 +78,10 @@ public class GuiChunkLoader extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:chunk_loader.name");
final String name = I18n.format("tile.techreborn:chunk_loader.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
}

View file

@ -29,7 +29,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.inventory.Container;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
public class GuiDestructoPack extends GuiContainer {
@ -52,9 +52,9 @@ public class GuiDestructoPack extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(int arg0, int arg1) {
String name = I18n.translateToLocal("item.techreborn.part.destructoPack.name");
String name = I18n.format("item.techreborn.part.destructoPack.name");
fontRenderer.drawString(name, xSize / 2 - fontRenderer.getStringWidth(name) / 2, 5, 4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory"), 8, this.ySize - 96 + 2,
this.fontRenderer.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2,
4210752);
super.drawGuiContainerForegroundLayer(arg0, arg1);
}

View file

@ -25,7 +25,6 @@
package techreborn.client.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import techreborn.tiles.TileDigitalChest;
public class GuiDigitalChest extends GuiBase {

View file

@ -31,7 +31,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import reborncore.client.multiblock.MultiblockRenderEvent;
import reborncore.client.multiblock.MultiblockSet;
import reborncore.common.misc.Location;
@ -56,9 +56,9 @@ public class GuiFusionReactor extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:fusion_control_computer.name");
final String name = I18n.format("tile.techreborn:fusion_control_computer.name");
this.fontRenderer.drawString(name, 87, 6, 4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
this.fontRenderer.drawString(PowerSystem.getLocaliszedPower(this.fusionController.getEnergy()), 11, 8,

View file

@ -28,7 +28,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import techreborn.tiles.multiblock.TileImplosionCompressor;
public class GuiImplosionCompressor extends GuiContainer {
@ -47,8 +47,6 @@ public class GuiImplosionCompressor extends GuiContainer {
@Override
public void initGui() {
final int k = (this.width - this.xSize) / 2;
final int l = (this.height - this.ySize) / 2;
super.initGui();
}
@ -63,7 +61,7 @@ public class GuiImplosionCompressor extends GuiContainer {
if (!this.compressor.getMutliBlock()) {
// GuiDraw.drawTooltipBox(k + 30, l + 50 + 12 - 0, 114, 10);
this.fontRenderer.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38, l + 52 + 12, -1);
this.fontRenderer.drawString(I18n.format("techreborn.message.missingmultiblock"), k + 38, l + 52 + 12, -1);
}
this.mc.getTextureManager().bindTexture(GuiImplosionCompressor.texture);
@ -80,9 +78,9 @@ public class GuiImplosionCompressor extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:implosion_compressor.name");
final String name = I18n.format("tile.techreborn:implosion_compressor.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6, 4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
}
@Override

View file

@ -28,7 +28,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import techreborn.tiles.TileIndustrialElectrolyzer;
public class GuiIndustrialElectrolyzer extends GuiContainer {
@ -47,8 +47,6 @@ public class GuiIndustrialElectrolyzer extends GuiContainer {
@Override
public void initGui() {
final int k = (this.width - this.xSize) / 2;
final int l = (this.height - this.ySize) / 2;
super.initGui();
}
@ -76,10 +74,10 @@ public class GuiIndustrialElectrolyzer extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:industrial_electrolyzer.name");
final String name = I18n.format("tile.techreborn:industrial_electrolyzer.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
}
}

View file

@ -30,7 +30,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import net.minecraftforge.fluids.FluidStack;
import techreborn.tiles.multiblock.TileIndustrialSawmill;
@ -50,8 +50,6 @@ public class GuiIndustrialSawmill extends GuiContainer {
@Override
public void initGui() {
final int k = (this.width - this.xSize) / 2;
final int l = (this.height - this.ySize) / 2;
super.initGui();
}
@ -81,7 +79,7 @@ public class GuiIndustrialSawmill extends GuiContainer {
if (!this.sawmill.getMutliBlock()) {
//GuiUtil.drawTooltipBox(k + 30, l + 50 + 12, 114, 10);
this.fontRenderer.drawString(I18n.translateToLocal("techreborn.message.missingmultiblock"), k + 38,
this.fontRenderer.drawString(I18n.format("techreborn.message.missingmultiblock"), k + 38,
l + 52 + 12, -1);
}
}
@ -110,9 +108,9 @@ public class GuiIndustrialSawmill extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:industrial_sawmill.name");
final String name = I18n.format("tile.techreborn:industrial_sawmill.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6, 4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory"), 58, this.ySize - 96 + 2, 4210752);
this.fontRenderer.drawString(I18n.format("container.inventory"), 58, this.ySize - 96 + 2, 4210752);
}
@Override

View file

@ -28,7 +28,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import techreborn.tiles.TileIronFurnace;
public class GuiIronFurnace extends GuiContainer {
@ -69,10 +69,10 @@ public class GuiIronFurnace extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:iron_furnace.name");
final String name = I18n.format("tile.techreborn:iron_furnace.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
}

View file

@ -28,7 +28,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import reborncore.common.powerSystem.PowerSystem;
import techreborn.client.container.ContainerLESU;
import techreborn.tiles.lesu.TileLapotronicSU;
@ -62,7 +62,7 @@ public class GuiLESU extends GuiContainer {
}
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
this.fontRenderer.drawString(I18n.translateToLocal("tile.techreborn:lapotronic_su.name"), 40, 10,
this.fontRenderer.drawString(I18n.format("tile.techreborn:lapotronic_su.name"), 40, 10,
Color.WHITE.getRGB());
this.fontRenderer.drawString(PowerSystem.getLocaliszedPower(containerLesu.euOut) + "/t", 10, 20,
Color.WHITE.getRGB());

View file

@ -25,7 +25,6 @@
package techreborn.client.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import techreborn.tiles.TileQuantumChest;
public class GuiQuantumChest extends GuiBase {

View file

@ -28,7 +28,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import techreborn.tiles.TileQuantumTank;
public class GuiQuantumTank extends GuiContainer {
@ -57,10 +57,10 @@ public class GuiQuantumTank extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:quantum_tank.name");
final String name = I18n.format("tile.techreborn:quantum_tank.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
this.fontRenderer.drawString("Liquid Amount", 10, 20, 16448255);
this.fontRenderer.drawString(this.quantumTank.tank.getFluidAmount() + "", 10, 30, 16448255);

View file

@ -29,7 +29,7 @@ import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import techreborn.tiles.TileRollingMachine;
public class GuiRollingMachine extends GuiContainer {
@ -65,10 +65,10 @@ public class GuiRollingMachine extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = I18n.translateToLocal("tile.techreborn:rolling_machine.name");
final String name = I18n.format("tile.techreborn:rolling_machine.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
4210752);
this.fontRenderer.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8,
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8,
this.ySize - 96 + 2, 4210752);
}

View file

@ -70,7 +70,7 @@ public class GuiScrapboxinator extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(final int p_146979_1_, final int p_146979_2_) {
final String name = net.minecraft.util.text.translation.I18n.translateToLocal("tile.techreborn:scrapboxinator.name");
final String name = I18n.format("tile.techreborn:scrapboxinator.name");
this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6,
4210752);
this.fontRenderer.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2,

View file

@ -31,7 +31,7 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.client.resources.I18n;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.client.config.GuiUtils;
import net.minecraftforge.fml.common.Loader;
@ -280,7 +280,7 @@ public class TRBuilder extends GuiBuilder {
GuiUtils.drawGradientRect(0, x, y + 68, x + 176, y + 70 + 20, 0xC0000000, 0x00000000);
GlStateManager.colorMask(true, true, true, true);
GlStateManager.enableDepth();
gui.drawCentredString(I18n.translateToLocal("techreborn.message.missingmultiblock"), 43, 0xFFFFFF, layer);
gui.drawCentredString(I18n.format("techreborn.message.missingmultiblock"), 43, 0xFFFFFF, layer);
}
public void drawBigBlueBar(GuiBase gui, int x, int y, int value, int max, int mouseX, int mouseY, GuiBase.Layer layer) {

View file

@ -1,7 +1,30 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2017 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.client.gui.autocrafting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButtonImage;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.RenderItem;
@ -37,7 +60,6 @@ public class GuiAutoCrafting extends GuiBase {
static final ResourceLocation RECIPE_BOOK_TEXTURE = new ResourceLocation("textures/gui/recipe_book.png");
GuiAutoCraftingRecipeSlector recipeSlector = new GuiAutoCraftingRecipeSlector();
private GuiButtonImage recipeButton;
boolean showGui = true;
InventoryCrafting dummyInv;
TileAutoCraftingTable tileAutoCraftingTable;

View file

@ -1,11 +1,32 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2017 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.client.gui.autocrafting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButtonToggle;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.recipebook.GuiRecipeBook;
import net.minecraft.client.gui.recipebook.RecipeList;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.crafting.IRecipe;

View file

@ -69,8 +69,6 @@ public class GuiSideConfig extends GuiBase {
@Override
protected void drawGuiContainerBackgroundLayer(final float f, final int mouseX, final int mouseY) {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
}
@Override

View file

@ -59,7 +59,6 @@ public class RenderNukePrimed extends Render<EntityNukePrimed> {
float f1 = 1.0F + f * 0.3F;
GlStateManager.scale(f1, f1, f1);
}
float f2 = (1.0F - ((float) entity.fuse - partialTicks + 1.0F) / 100.0F) * 0.8F;
this.bindEntityTexture(entity);
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
blockrendererdispatcher.renderBlockBrightness(ModBlocks.NUKE.getDefaultState(),