diff --git a/src/main/java/techreborn/blocks/storage/BlockAdjustableSU.java b/src/main/java/techreborn/blocks/storage/BlockAdjustableSU.java index a2e51ccc5..07851acc8 100644 --- a/src/main/java/techreborn/blocks/storage/BlockAdjustableSU.java +++ b/src/main/java/techreborn/blocks/storage/BlockAdjustableSU.java @@ -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; diff --git a/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java b/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java index 809b31c82..8d57ce4ab 100644 --- a/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java +++ b/src/main/java/techreborn/blocks/tier1/BlockAlloySmelter.java @@ -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 { diff --git a/src/main/java/techreborn/client/GuiHandler.java b/src/main/java/techreborn/client/GuiHandler.java index 6f84c2f2f..342eca508 100644 --- a/src/main/java/techreborn/client/GuiHandler.java +++ b/src/main/java/techreborn/client/GuiHandler.java @@ -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 { diff --git a/src/main/java/techreborn/client/RegisterItemJsons.java b/src/main/java/techreborn/client/RegisterItemJsons.java index 6313d5549..db047adea 100644 --- a/src/main/java/techreborn/client/RegisterItemJsons.java +++ b/src/main/java/techreborn/client/RegisterItemJsons.java @@ -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, ""); } diff --git a/src/main/java/techreborn/client/container/ContainerAESU.java b/src/main/java/techreborn/client/container/ContainerAESU.java index 76127a686..d001a9bf0 100644 --- a/src/main/java/techreborn/client/container/ContainerAESU.java +++ b/src/main/java/techreborn/client/container/ContainerAESU.java @@ -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 { diff --git a/src/main/java/techreborn/client/gui/GuiAESU.java b/src/main/java/techreborn/client/gui/GuiAESU.java index 09f26e3a9..aeca0cd3f 100644 --- a/src/main/java/techreborn/client/gui/GuiAESU.java +++ b/src/main/java/techreborn/client/gui/GuiAESU.java @@ -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()); diff --git a/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java b/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java index 0b93fb362..e2936367f 100644 --- a/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java @@ -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); } diff --git a/src/main/java/techreborn/client/gui/GuiAlloySmelter.java b/src/main/java/techreborn/client/gui/GuiAlloySmelter.java index 483b1b64f..b82f87ece 100644 --- a/src/main/java/techreborn/client/gui/GuiAlloySmelter.java +++ b/src/main/java/techreborn/client/gui/GuiAlloySmelter.java @@ -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); } diff --git a/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java b/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java index b7382356e..1dd1c67ce 100644 --- a/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java +++ b/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java @@ -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); } diff --git a/src/main/java/techreborn/client/gui/GuiBase.java b/src/main/java/techreborn/client/gui/GuiBase.java index de1742651..6f059b200 100644 --- a/src/main/java/techreborn/client/gui/GuiBase.java +++ b/src/main/java/techreborn/client/gui/GuiBase.java @@ -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) { diff --git a/src/main/java/techreborn/client/gui/GuiChunkLoader.java b/src/main/java/techreborn/client/gui/GuiChunkLoader.java index 3ae7769cf..7680522a0 100644 --- a/src/main/java/techreborn/client/gui/GuiChunkLoader.java +++ b/src/main/java/techreborn/client/gui/GuiChunkLoader.java @@ -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); } diff --git a/src/main/java/techreborn/client/gui/GuiDestructoPack.java b/src/main/java/techreborn/client/gui/GuiDestructoPack.java index 8331a1076..2da9c0cbb 100644 --- a/src/main/java/techreborn/client/gui/GuiDestructoPack.java +++ b/src/main/java/techreborn/client/gui/GuiDestructoPack.java @@ -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); } diff --git a/src/main/java/techreborn/client/gui/GuiDigitalChest.java b/src/main/java/techreborn/client/gui/GuiDigitalChest.java index e98bc1c6c..782a15b32 100644 --- a/src/main/java/techreborn/client/gui/GuiDigitalChest.java +++ b/src/main/java/techreborn/client/gui/GuiDigitalChest.java @@ -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 { diff --git a/src/main/java/techreborn/client/gui/GuiFusionReactor.java b/src/main/java/techreborn/client/gui/GuiFusionReactor.java index 513ee72e0..666b6290d 100644 --- a/src/main/java/techreborn/client/gui/GuiFusionReactor.java +++ b/src/main/java/techreborn/client/gui/GuiFusionReactor.java @@ -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, diff --git a/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java b/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java index 13fffce87..01e16cedf 100644 --- a/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java +++ b/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java @@ -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 diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java b/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java index c9b009650..03c671fe0 100644 --- a/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java +++ b/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java @@ -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); } } diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java b/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java index e5d389dab..b9d29b4b4 100644 --- a/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java +++ b/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java @@ -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 diff --git a/src/main/java/techreborn/client/gui/GuiIronFurnace.java b/src/main/java/techreborn/client/gui/GuiIronFurnace.java index 11174a9a7..21e060c85 100644 --- a/src/main/java/techreborn/client/gui/GuiIronFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiIronFurnace.java @@ -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); } diff --git a/src/main/java/techreborn/client/gui/GuiLESU.java b/src/main/java/techreborn/client/gui/GuiLESU.java index a39318394..3f924fc1c 100644 --- a/src/main/java/techreborn/client/gui/GuiLESU.java +++ b/src/main/java/techreborn/client/gui/GuiLESU.java @@ -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()); diff --git a/src/main/java/techreborn/client/gui/GuiQuantumChest.java b/src/main/java/techreborn/client/gui/GuiQuantumChest.java index ff48e6161..201ff6f65 100644 --- a/src/main/java/techreborn/client/gui/GuiQuantumChest.java +++ b/src/main/java/techreborn/client/gui/GuiQuantumChest.java @@ -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 { diff --git a/src/main/java/techreborn/client/gui/GuiQuantumTank.java b/src/main/java/techreborn/client/gui/GuiQuantumTank.java index fc57fef24..2ee1318e0 100644 --- a/src/main/java/techreborn/client/gui/GuiQuantumTank.java +++ b/src/main/java/techreborn/client/gui/GuiQuantumTank.java @@ -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); diff --git a/src/main/java/techreborn/client/gui/GuiRollingMachine.java b/src/main/java/techreborn/client/gui/GuiRollingMachine.java index e0f1286b9..c99340136 100644 --- a/src/main/java/techreborn/client/gui/GuiRollingMachine.java +++ b/src/main/java/techreborn/client/gui/GuiRollingMachine.java @@ -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); } diff --git a/src/main/java/techreborn/client/gui/GuiScrapboxinator.java b/src/main/java/techreborn/client/gui/GuiScrapboxinator.java index 6c3649662..6edf76f4b 100644 --- a/src/main/java/techreborn/client/gui/GuiScrapboxinator.java +++ b/src/main/java/techreborn/client/gui/GuiScrapboxinator.java @@ -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, diff --git a/src/main/java/techreborn/client/gui/TRBuilder.java b/src/main/java/techreborn/client/gui/TRBuilder.java index 5c2d569dc..c0280db24 100644 --- a/src/main/java/techreborn/client/gui/TRBuilder.java +++ b/src/main/java/techreborn/client/gui/TRBuilder.java @@ -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) { diff --git a/src/main/java/techreborn/client/gui/autocrafting/GuiAutoCrafting.java b/src/main/java/techreborn/client/gui/autocrafting/GuiAutoCrafting.java index 53604cfaf..9ed8ab74a 100644 --- a/src/main/java/techreborn/client/gui/autocrafting/GuiAutoCrafting.java +++ b/src/main/java/techreborn/client/gui/autocrafting/GuiAutoCrafting.java @@ -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; diff --git a/src/main/java/techreborn/client/gui/autocrafting/GuiAutoCraftingRecipeSlector.java b/src/main/java/techreborn/client/gui/autocrafting/GuiAutoCraftingRecipeSlector.java index d86e774cc..8d6cc4400 100644 --- a/src/main/java/techreborn/client/gui/autocrafting/GuiAutoCraftingRecipeSlector.java +++ b/src/main/java/techreborn/client/gui/autocrafting/GuiAutoCraftingRecipeSlector.java @@ -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; diff --git a/src/main/java/techreborn/client/gui/upgrades/GuiSideConfig.java b/src/main/java/techreborn/client/gui/upgrades/GuiSideConfig.java index 59d2798ee..a557189d6 100644 --- a/src/main/java/techreborn/client/gui/upgrades/GuiSideConfig.java +++ b/src/main/java/techreborn/client/gui/upgrades/GuiSideConfig.java @@ -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 diff --git a/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java b/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java index 83a7ad3e3..781516244 100644 --- a/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java +++ b/src/main/java/techreborn/client/render/entitys/RenderNukePrimed.java @@ -59,7 +59,6 @@ public class RenderNukePrimed extends Render { 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(), diff --git a/src/main/java/techreborn/compat/CompatManager.java b/src/main/java/techreborn/compat/CompatManager.java index 63441532a..06d0b1676 100644 --- a/src/main/java/techreborn/compat/CompatManager.java +++ b/src/main/java/techreborn/compat/CompatManager.java @@ -62,7 +62,7 @@ public class CompatManager { } public void registerCompact(Class moduleClass, boolean config, Object... objs) { - boolean shouldLoad = true; + //boolean shouldLoad = true; //TODO config // if (config) { // shouldLoad = ConfigTechReborn.config diff --git a/src/main/java/techreborn/compat/crafttweaker/CTFusionReactor.java b/src/main/java/techreborn/compat/crafttweaker/CTFusionReactor.java index 223e09857..3ba57af25 100644 --- a/src/main/java/techreborn/compat/crafttweaker/CTFusionReactor.java +++ b/src/main/java/techreborn/compat/crafttweaker/CTFusionReactor.java @@ -133,6 +133,7 @@ public class CTFusionReactor { } } + @SuppressWarnings("unused") private static class RemoveBottomInput implements IAction { private final IIngredient output; List removedRecipes = new ArrayList(); diff --git a/src/main/java/techreborn/compat/thermalexpansion/RecipeThermalExpansion.java b/src/main/java/techreborn/compat/thermalexpansion/RecipeThermalExpansion.java index 5b8934c2a..1c18ed8df 100644 --- a/src/main/java/techreborn/compat/thermalexpansion/RecipeThermalExpansion.java +++ b/src/main/java/techreborn/compat/thermalexpansion/RecipeThermalExpansion.java @@ -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; diff --git a/src/main/java/techreborn/dispenser/BehaviorDispenseScrapbox.java b/src/main/java/techreborn/dispenser/BehaviorDispenseScrapbox.java index 5f85fa88b..11992fcee 100644 --- a/src/main/java/techreborn/dispenser/BehaviorDispenseScrapbox.java +++ b/src/main/java/techreborn/dispenser/BehaviorDispenseScrapbox.java @@ -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(); diff --git a/src/main/java/techreborn/events/TRRecipeHandler.java b/src/main/java/techreborn/events/TRRecipeHandler.java index a59d8dd18..6adfb0e43 100644 --- a/src/main/java/techreborn/events/TRRecipeHandler.java +++ b/src/main/java/techreborn/events/TRRecipeHandler.java @@ -42,9 +42,10 @@ import java.util.List; public class TRRecipeHandler { + @SuppressWarnings("rawtypes") private static List hiddenEntrys = new ArrayList<>(); - public static void hideEntry(IForgeRegistryEntry entry) { + public static void hideEntry(IForgeRegistryEntry entry) { hiddenEntrys.add(entry); } diff --git a/src/main/java/techreborn/init/ModBlocks.java b/src/main/java/techreborn/init/ModBlocks.java index cb6c8ccbf..0f69d997f 100644 --- a/src/main/java/techreborn/init/ModBlocks.java +++ b/src/main/java/techreborn/init/ModBlocks.java @@ -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; diff --git a/src/main/java/techreborn/init/recipes/IngredientCell.java b/src/main/java/techreborn/init/recipes/IngredientCell.java index dcf510470..5c79ad5eb 100644 --- a/src/main/java/techreborn/init/recipes/IngredientCell.java +++ b/src/main/java/techreborn/init/recipes/IngredientCell.java @@ -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; diff --git a/src/main/java/techreborn/itemblocks/ItemBlockAdjustableSU.java b/src/main/java/techreborn/itemblocks/ItemBlockAdjustableSU.java index 442e89f16..9381da41b 100644 --- a/src/main/java/techreborn/itemblocks/ItemBlockAdjustableSU.java +++ b/src/main/java/techreborn/itemblocks/ItemBlockAdjustableSU.java @@ -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)) diff --git a/src/main/java/techreborn/items/ItemFrequencyTransmitter.java b/src/main/java/techreborn/items/ItemFrequencyTransmitter.java index 4435dbd57..39138466e 100644 --- a/src/main/java/techreborn/items/ItemFrequencyTransmitter.java +++ b/src/main/java/techreborn/items/ItemFrequencyTransmitter.java @@ -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; diff --git a/src/main/java/techreborn/items/armor/ItemTRArmour.java b/src/main/java/techreborn/items/armor/ItemTRArmour.java index 0abf43871..cccd1986b 100644 --- a/src/main/java/techreborn/items/armor/ItemTRArmour.java +++ b/src/main/java/techreborn/items/armor/ItemTRArmour.java @@ -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) diff --git a/src/main/java/techreborn/items/tools/ItemCloakingDevice.java b/src/main/java/techreborn/items/tools/ItemCloakingDevice.java index 3edb08408..a1ecce489 100644 --- a/src/main/java/techreborn/items/tools/ItemCloakingDevice.java +++ b/src/main/java/techreborn/items/tools/ItemCloakingDevice.java @@ -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"); diff --git a/src/main/java/techreborn/items/tools/ItemJackhammer.java b/src/main/java/techreborn/items/tools/ItemJackhammer.java index 5eabd0e03..3e137e2cd 100644 --- a/src/main/java/techreborn/items/tools/ItemJackhammer.java +++ b/src/main/java/techreborn/items/tools/ItemJackhammer.java @@ -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 itemList) { diff --git a/src/main/java/techreborn/items/tools/ItemNanosaber.java b/src/main/java/techreborn/items/tools/ItemNanosaber.java index 2b8e4880c..b1a4ed5b5 100644 --- a/src/main/java/techreborn/items/tools/ItemNanosaber.java +++ b/src/main/java/techreborn/items/tools/ItemNanosaber.java @@ -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); } } diff --git a/src/main/java/techreborn/items/tools/ItemTechManual.java b/src/main/java/techreborn/items/tools/ItemTechManual.java index 4cbbd225b..a6a5d9160 100644 --- a/src/main/java/techreborn/items/tools/ItemTechManual.java +++ b/src/main/java/techreborn/items/tools/ItemTechManual.java @@ -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 tooltip, ITooltipFlag flag) { - tooltip.add(TextFormatting.RED + I18n.translateToLocal("tooltip.wip")); + tooltip.add(TextFormatting.RED + I18n.format("tooltip.wip")); } } diff --git a/src/main/java/techreborn/packets/PacketAesu.java b/src/main/java/techreborn/packets/PacketAesu.java index 0060d8262..a1bc53665 100644 --- a/src/main/java/techreborn/packets/PacketAesu.java +++ b/src/main/java/techreborn/packets/PacketAesu.java @@ -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; diff --git a/src/main/java/techreborn/packets/PacketSetRecipe.java b/src/main/java/techreborn/packets/PacketSetRecipe.java index 32d9ae481..6ab364aca 100644 --- a/src/main/java/techreborn/packets/PacketSetRecipe.java +++ b/src/main/java/techreborn/packets/PacketSetRecipe.java @@ -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; diff --git a/src/main/java/techreborn/tiles/TileAutoCraftingTable.java b/src/main/java/techreborn/tiles/TileAutoCraftingTable.java index fbec9323d..459a16d41 100644 --- a/src/main/java/techreborn/tiles/TileAutoCraftingTable.java +++ b/src/main/java/techreborn/tiles/TileAutoCraftingTable.java @@ -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; diff --git a/src/main/java/techreborn/tiles/TileRollingMachine.java b/src/main/java/techreborn/tiles/TileRollingMachine.java index dd91a3329..6d3c60b9e 100644 --- a/src/main/java/techreborn/tiles/TileRollingMachine.java +++ b/src/main/java/techreborn/tiles/TileRollingMachine.java @@ -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 diff --git a/src/main/java/techreborn/tiles/TileAdjustableSU.java b/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java similarity index 98% rename from src/main/java/techreborn/tiles/TileAdjustableSU.java rename to src/main/java/techreborn/tiles/storage/TileAdjustableSU.java index 835a815b2..a4432cb2f 100644 --- a/src/main/java/techreborn/tiles/TileAdjustableSU.java +++ b/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java @@ -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; diff --git a/src/main/java/techreborn/tiles/TileAlloySmelter.java b/src/main/java/techreborn/tiles/teir1/TileAlloySmelter.java similarity index 99% rename from src/main/java/techreborn/tiles/TileAlloySmelter.java rename to src/main/java/techreborn/tiles/teir1/TileAlloySmelter.java index c8c503b43..4e5ad26aa 100644 --- a/src/main/java/techreborn/tiles/TileAlloySmelter.java +++ b/src/main/java/techreborn/tiles/teir1/TileAlloySmelter.java @@ -22,7 +22,7 @@ * SOFTWARE. */ -package techreborn.tiles; +package techreborn.tiles.teir1; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ISidedInventory;