Refactoring for translation
This commit is contained in:
parent
8a8205b4b1
commit
ab1802ba5e
48 changed files with 240 additions and 118 deletions
|
@ -32,7 +32,7 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import techreborn.client.EGui;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.TileAdjustableSU;
|
||||
import techreborn.tiles.storage.TileAdjustableSU;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -33,7 +33,7 @@ import reborncore.common.blocks.BlockMachineBase;
|
|||
import techreborn.client.EGui;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.TileAlloySmelter;
|
||||
import techreborn.tiles.teir1.TileAlloySmelter;
|
||||
|
||||
public class BlockAlloySmelter extends BlockMachineBase {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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, "");
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -62,7 +62,7 @@ public class CompatManager {
|
|||
}
|
||||
|
||||
public void registerCompact(Class<? extends ICompatModule> moduleClass, boolean config, Object... objs) {
|
||||
boolean shouldLoad = true;
|
||||
//boolean shouldLoad = true;
|
||||
//TODO config
|
||||
// if (config) {
|
||||
// shouldLoad = ConfigTechReborn.config
|
||||
|
|
|
@ -133,6 +133,7 @@ public class CTFusionReactor {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class RemoveBottomInput implements IAction {
|
||||
private final IIngredient output;
|
||||
List<FusionReactorRecipe> removedRecipes = new ArrayList<FusionReactorRecipe>();
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
/*
|
||||
* 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.compat.thermalexpansion;
|
||||
|
||||
import cofh.api.util.ThermalExpansionHelper;
|
||||
|
|
|
@ -48,9 +48,9 @@ public class BehaviorDispenseScrapbox extends BehaviorDefaultDispenseItem {
|
|||
if (dispenseScrapboxes) {
|
||||
int random = source.getWorld().rand.nextInt(ScrapboxList.stacks.size());
|
||||
ItemStack out = ScrapboxList.stacks.get(random).copy();
|
||||
float xOffset = source.getWorld().rand.nextFloat() * 0.8F + 0.1F;
|
||||
/* float xOffset = source.getWorld().rand.nextFloat() * 0.8F + 0.1F;
|
||||
float yOffset = source.getWorld().rand.nextFloat() * 0.8F + 0.1F;
|
||||
float zOffset = source.getWorld().rand.nextFloat() * 0.8F + 0.1F;
|
||||
float zOffset = source.getWorld().rand.nextFloat() * 0.8F + 0.1F;*/
|
||||
stack.splitStack(1);
|
||||
|
||||
TileEntityDispenser tile = source.getBlockTileEntity();
|
||||
|
|
|
@ -42,9 +42,10 @@ import java.util.List;
|
|||
|
||||
public class TRRecipeHandler {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static List<IForgeRegistryEntry> hiddenEntrys = new ArrayList<>();
|
||||
|
||||
public static void hideEntry(IForgeRegistryEntry entry) {
|
||||
public static void hideEntry(IForgeRegistryEntry<?> entry) {
|
||||
hiddenEntrys.add(entry);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,6 +61,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.*;
|
||||
import techreborn.tiles.transformers.TileHVTransformer;
|
||||
import techreborn.tiles.transformers.TileLVTransformer;
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
/*
|
||||
* 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.init.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
|
|
@ -40,7 +40,7 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.TileAdjustableSU;
|
||||
import techreborn.tiles.storage.TileAdjustableSU;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -69,8 +69,6 @@ public class ItemBlockAdjustableSU extends ItemBlock {
|
|||
}
|
||||
if (world.getBlockState(pos).getBlock() == block) {
|
||||
world.getBlockState(pos).getBlock().onBlockPlacedBy(world, pos, newState, player, stack);
|
||||
// world.getBlockState(pos).getBlock().onPostBlockPlaced(world, x,
|
||||
// y, z, metadata);
|
||||
}
|
||||
if (!stack.isEmpty() && stack.hasTagCompound()) {
|
||||
((TileAdjustableSU) world.getTileEntity(pos))
|
||||
|
|
|
@ -33,7 +33,7 @@ import net.minecraft.util.*;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -81,13 +81,13 @@ public class ItemFrequencyTransmitter extends ItemTR {
|
|||
|
||||
if (!world.isRemote) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.freqTransmitterID, new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.setTo") + " X: " +
|
||||
TextFormatting.GRAY + I18n.format("techreborn.message.setTo") + " X: " +
|
||||
TextFormatting.GOLD + pos.getX() +
|
||||
TextFormatting.GRAY + " Y: " +
|
||||
TextFormatting.GOLD + pos.getY() +
|
||||
TextFormatting.GRAY + " Z: " +
|
||||
TextFormatting.GOLD + pos.getZ() +
|
||||
TextFormatting.GRAY + " " + I18n.translateToLocal("techreborn.message.in") + " " +
|
||||
TextFormatting.GRAY + " " + I18n.format("techreborn.message.in") + " " +
|
||||
TextFormatting.GOLD + DimensionManager.getProviderType(world.provider.getDimension())
|
||||
.getName() + " (" + world.provider.getDimension() + ")"));
|
||||
}
|
||||
|
@ -102,8 +102,8 @@ public class ItemFrequencyTransmitter extends ItemTR {
|
|||
stack.setTagCompound(null);
|
||||
if (!world.isRemote) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.freqTransmitterID, new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.coordsHaveBeen") + " "
|
||||
+ TextFormatting.GOLD + I18n.translateToLocal("techreborn.message.cleared")));
|
||||
TextFormatting.GRAY + I18n.format("techreborn.message.coordsHaveBeen") + " "
|
||||
+ TextFormatting.GOLD + I18n.format("techreborn.message.cleared")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ public class ItemFrequencyTransmitter extends ItemTR {
|
|||
list.add(TextFormatting.DARK_GRAY + DimensionManager.getProviderType(dim).getName());
|
||||
|
||||
} else {
|
||||
list.add(TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.noCoordsSet"));
|
||||
list.add(TextFormatting.GRAY + I18n.format("techreborn.message.noCoordsSet"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ public class ItemFrequencyTransmitter extends ItemTR {
|
|||
int coordDim = stack.getTagCompound().getInteger("dim");
|
||||
text = grey + "X: " + gold + coordX + grey + " Y: " + gold + coordY + grey + " Z: " + gold + coordZ + grey + " Dim: " + gold + DimensionManager.getProviderType(coordDim).getName() + " (" + coordDim + ")";
|
||||
} else {
|
||||
text = grey + I18n.translateToLocal("techreborn.message.noCoordsSet");
|
||||
text = grey + I18n.format("techreborn.message.noCoordsSet");
|
||||
}
|
||||
}
|
||||
return text;
|
||||
|
|
|
@ -34,9 +34,6 @@ import techreborn.events.TRRecipeHandler;
|
|||
*/
|
||||
public class ItemTRArmour extends ItemArmor {
|
||||
|
||||
private ArmorMaterial material = ArmorMaterial.LEATHER;
|
||||
private EntityEquipmentSlot slot = EntityEquipmentSlot.HEAD;
|
||||
|
||||
public ItemTRArmour(ArmorMaterial material, EntityEquipmentSlot slot) {
|
||||
super(material, material.getDamageReductionAmount(slot), slot);
|
||||
if (slot == EntityEquipmentSlot.HEAD)
|
||||
|
|
|
@ -59,7 +59,6 @@ public class ItemCloakingDevice extends ItemTR implements IEnergyItemInfo, IEner
|
|||
public static int MaxCharge = ConfigTechReborn.CloakingDeviceCharge;
|
||||
public static int Limit = 100;
|
||||
public static boolean isActive;
|
||||
private int armorType = 1;
|
||||
|
||||
public ItemCloakingDevice() {
|
||||
setUnlocalizedName("techreborn.cloakingdevice");
|
||||
|
|
|
@ -122,7 +122,6 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo, IEne
|
|||
return transferLimit;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
|
||||
|
|
|
@ -40,7 +40,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -141,9 +141,9 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo, IEnergy
|
|||
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
if (stack.getTagCompound() == null || !stack.getTagCompound().getBoolean("isActive")) {
|
||||
list.add(TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.nanosaberInactive"));
|
||||
list.add(TextFormatting.GRAY + I18n.format("techreborn.message.nanosaberInactive"));
|
||||
} else {
|
||||
list.add(TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.nanosaberActive"));
|
||||
list.add(TextFormatting.GRAY + I18n.format("techreborn.message.nanosaberActive"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,9 +154,9 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo, IEnergy
|
|||
if (player.isSneaking()) {
|
||||
if (!PoweredItem.canUseEnergy(this.cost, stack)) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.nanosaberID, new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.nanosaberEnergyErrorTo") + " "
|
||||
TextFormatting.GRAY + I18n.format("techreborn.message.nanosaberEnergyErrorTo") + " "
|
||||
+ TextFormatting.GOLD + I18n
|
||||
.translateToLocal("techreborn.message.nanosaberActivate")));
|
||||
.format("techreborn.message.nanosaberActivate")));
|
||||
} else {
|
||||
if (stack.getTagCompound() == null || !stack.getTagCompound().getBoolean("isActive")) {
|
||||
if (stack.getTagCompound() == null) {
|
||||
|
@ -165,17 +165,17 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo, IEnergy
|
|||
stack.getTagCompound().setBoolean("isActive", true);
|
||||
if (world.isRemote) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.nanosaberID, new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.setTo") + " "
|
||||
TextFormatting.GRAY + I18n.format("techreborn.message.setTo") + " "
|
||||
+ TextFormatting.GOLD + I18n
|
||||
.translateToLocal("techreborn.message.nanosaberActive")));
|
||||
.format("techreborn.message.nanosaberActive")));
|
||||
}
|
||||
} else {
|
||||
stack.getTagCompound().setBoolean("isActive", false);
|
||||
if (world.isRemote) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.nanosaberID, new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.setTo") + " "
|
||||
TextFormatting.GRAY + I18n.format("techreborn.message.setTo") + " "
|
||||
+ TextFormatting.GOLD + I18n
|
||||
.translateToLocal("techreborn.message.nanosaberInactive")));
|
||||
.format("techreborn.message.nanosaberInactive")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -188,9 +188,9 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo, IEnergy
|
|||
public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
|
||||
if (stack.getTagCompound() != null && stack.getTagCompound().getBoolean("isActive") && !PoweredItem.canUseEnergy(cost, stack)) {
|
||||
ChatUtils.sendNoSpamMessages(MessageIDs.nanosaberID, new TextComponentString(
|
||||
TextFormatting.GRAY + I18n.translateToLocal("techreborn.message.nanosaberEnergyError") + " "
|
||||
TextFormatting.GRAY + I18n.format("techreborn.message.nanosaberEnergyError") + " "
|
||||
+ TextFormatting.GOLD + I18n
|
||||
.translateToLocal("techreborn.message.nanosaberDeactivating")));
|
||||
.format("techreborn.message.nanosaberDeactivating")));
|
||||
stack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ import net.minecraft.util.ActionResult;
|
|||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.EGui;
|
||||
|
@ -58,6 +58,6 @@ public class ItemTechManual extends ItemTR {
|
|||
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final World world, final List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(TextFormatting.RED + I18n.translateToLocal("tooltip.wip"));
|
||||
tooltip.add(TextFormatting.RED + I18n.format("tooltip.wip"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import reborncore.common.network.ExtendedPacketBuffer;
|
||||
import reborncore.common.network.INetworkPacket;
|
||||
import techreborn.tiles.TileAdjustableSU;
|
||||
import techreborn.tiles.storage.TileAdjustableSU;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
/*
|
||||
* 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.packets;
|
||||
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
/*
|
||||
* 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.tiles;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
|
|
@ -102,13 +102,13 @@ public class TileRollingMachine extends TilePowerAcceptor
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
this.charge(2);
|
||||
if (!this.world.isRemote) {
|
||||
this.currentRecipe = RollingMachineRecipe.instance.findMatchingRecipe(this.craftMatrix, this.world);
|
||||
if (!this.currentRecipe.isEmpty() && this.canMake()) {
|
||||
if (this.tickTime >= this.runTime) {
|
||||
if (this.tickTime >= TileRollingMachine.runTime) {
|
||||
this.currentRecipe = RollingMachineRecipe.instance.findMatchingRecipe(this.craftMatrix, this.world);
|
||||
if (!this.currentRecipe.isEmpty()) {
|
||||
boolean hasCrafted = false;
|
||||
|
@ -136,7 +136,7 @@ public class TileRollingMachine extends TilePowerAcceptor
|
|||
}
|
||||
}
|
||||
if (!this.currentRecipe.isEmpty()) {
|
||||
if (this.canUseEnergy(energyPerTick) && this.tickTime < this.runTime) {
|
||||
if (this.canUseEnergy(energyPerTick) && this.tickTime < TileRollingMachine.runTime) {
|
||||
this.useEnergy(energyPerTick);
|
||||
this.tickTime++;
|
||||
}
|
||||
|
@ -225,10 +225,10 @@ public class TileRollingMachine extends TilePowerAcceptor
|
|||
}
|
||||
|
||||
public int getBurnTimeRemainingScaled(final int scale) {
|
||||
if (this.tickTime == 0 || this.runTime == 0) {
|
||||
if (this.tickTime == 0 || TileRollingMachine.runTime == 0) {
|
||||
return 0;
|
||||
}
|
||||
return this.tickTime * scale / this.runTime;
|
||||
return this.tickTime * scale / TileRollingMachine.runTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.tiles;
|
||||
package techreborn.tiles.storage;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -57,8 +57,8 @@ public class TileAdjustableSU extends TilePowerAcceptor implements IToolDrop {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
public void update() {
|
||||
super.update();
|
||||
if (ticks == 100) {
|
||||
euChange = -1;
|
||||
ticks = 0;
|
|
@ -22,7 +22,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package techreborn.tiles;
|
||||
package techreborn.tiles.teir1;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
Loading…
Reference in a new issue