diff options
| author | YannickMG <yannickmg@gmail.com> | 2022-02-03 12:55:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-03 18:55:55 +0100 |
| commit | a48a158ad76dfa0b8d74894bbbe8d2520ff760af (patch) | |
| tree | ce6ac0d636c9076f15febc0e1a47efa25c83cdf6 /src/main/java/gregtech/common | |
| parent | b4ff9ad8d8a8003a2b0a63e0a2153f37f60cd02f (diff) | |
| download | GT5-Unofficial-a48a158ad76dfa0b8d74894bbbe8d2520ff760af.tar.gz GT5-Unofficial-a48a158ad76dfa0b8d74894bbbe8d2520ff760af.tar.bz2 GT5-Unofficial-a48a158ad76dfa0b8d74894bbbe8d2520ff760af.zip | |
Basic Machine NEI Power Tiers (#914)
* Add IntelliJ .shelf folder to .gitignore
* Fixing GT_GuiTooltip bug I introduced
* Deprecated superfluous String trans methods.
* Add Power class to compute and describe power usage
* trans -> GT_Utility.trans
Removed absent param from Javadoc
* Add Power to BasicMachine and use it for power calculations
* Steam BasicMachine rework
Have Bronze and Steel tier override Power with appropriate SteamPower
Make Bronze machines explicitly tier 1
Make Steel machines explicitly tier 2
Defined recipe list and bricked status for each machine
Unified checkRecipe uses machine's recipe list and Power
* Raised NEI dependency to 2.2.5
* Defining NEI transfer rect in individual UIs
Using a new interface called from GT_RectHandler
* Code cleanup & minor refactor
* Add power field to NEI Default Handler
Add method to create Power object from the recipe map
* Display power tier in NEI handler name
* User Power to draw NEI Handler description
* Enable filtering handler recipes using Power
* Repurposing aBricked parameter into aHighPressure
To fix my previous faulty method of setting mTier
* Must call getCache to get recipes properly.
* Better communicate NEI Overclock info
Diffstat (limited to 'src/main/java/gregtech/common')
33 files changed, 421 insertions, 156 deletions
diff --git a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java index 64731c652f..827a7d2d10 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java @@ -41,36 +41,36 @@ public class GT_Container_ChestBuffer extends GT_ContainerMetaTile_Machine { if (aSlotIndex == 27) { ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, trans("116","Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116","Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("117","Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117","Don't emit Energy")); } return null; } if (aSlotIndex == 28) { ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, trans("118","Emit Redstone if no Slot is free")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("118","Emit Redstone if no Slot is free")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("119","Don't emit Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("119","Don't emit Redstone")); } return null; } if (aSlotIndex == 29) { ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, trans("120","Invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120","Invert Redstone")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("121","Don't invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121","Don't invert Redstone")); } return null; } if (aSlotIndex == 30) { ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode) { - GT_Utility.sendChatToPlayer(aPlayer, trans("217","Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("217","Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("218", "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("218", "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); } return null; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_Filter.java b/src/main/java/gregtech/common/gui/GT_Container_Filter.java index cc3efaefb7..7ca72b8e3a 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Filter.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Filter.java @@ -72,45 +72,45 @@ public class GT_Container_Filter extends GT_ContainerMetaTile_Machine { if (aSlotIndex == 18) { ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, trans("116","Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116","Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("117","Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117","Don't emit Energy")); } return null; } if (aSlotIndex == 19) { ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, trans("122","Emit Redstone if slots contain something")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("122","Emit Redstone if slots contain something")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("123","Don't emit Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("123","Don't emit Redstone")); } return null; } if (aSlotIndex == 20) { ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, trans("120","Invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120","Invert Redstone")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("121","Don't invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121","Don't invert Redstone")); } return null; } if (aSlotIndex == 21) { ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bInvertFilter) { - GT_Utility.sendChatToPlayer(aPlayer, trans("124","Invert Filter")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("124","Invert Filter")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("125","Don't invert Filter")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("125","Don't invert Filter")); } return null; } if (aSlotIndex == 22) { ((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT = (!((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT); if (((GT_MetaTileEntity_Filter) this.mTileEntity.getMetaTileEntity()).bIgnoreNBT) { - GT_Utility.sendChatToPlayer(aPlayer, trans("126","Ignore NBT")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("126","Ignore NBT")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("127","NBT has to match")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("127","NBT has to match")); } return null; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java b/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java index 0ee3cc1d44..6f3c8fe85c 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java +++ b/src/main/java/gregtech/common/gui/GT_Container_ItemDistributor.java @@ -40,27 +40,27 @@ public class GT_Container_ItemDistributor extends GT_ContainerMetaTile_Machine { if (aSlotIndex == 27) { ((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, trans("116","Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116","Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("117","Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117","Don't emit Energy")); } return null; } if (aSlotIndex == 28) { ((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if (((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, trans("118","Emit Redstone if no Slot is free")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("118","Emit Redstone if no Slot is free")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("119","Don't emit Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("119","Don't emit Redstone")); } return null; } if (aSlotIndex == 29) { ((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bInvert); if (((GT_MetaTileEntity_ItemDistributor) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, trans("120","Invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120","Invert Redstone")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("121","Don't invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121","Don't invert Redstone")); } return null; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java b/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java index 6651d7875a..25179d718e 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java +++ b/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java @@ -35,12 +35,12 @@ public class GT_Container_OutputHatch extends GT_Container_BasicTank { // If player click the locker slot with empty or the same fluid cell, clear the lock fluid if (tReadyLockFluid == null || (tMode >= 8 && tReadyLockFluid.getFluid().getName().equals(tHatch.getLockedFluidName()))) { tHatch.setLockedFluidName(null); - GT_Utility.sendChatToPlayer(aPlayer, trans("300", "Fluid Lock Cleared.")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("300", "Fluid Lock Cleared.")); tHatch.mMode = 0; } else { tHatch.setLockedFluidName(tReadyLockFluid.getFluid().getName()); - GT_Utility.sendChatToPlayer(aPlayer, String.format(trans("151.4", "Sucessfully locked Fluid to %s"), tReadyLockFluid.getLocalizedName())); + GT_Utility.sendChatToPlayer(aPlayer, String.format(GT_Utility.trans("151.4", "Sucessfully locked Fluid to %s"), tReadyLockFluid.getLocalizedName())); tHatch.mMode = 9; } } diff --git a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java index f50ac2dae3..909e1a04a5 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java +++ b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java @@ -72,9 +72,9 @@ public class GT_Container_Regulator extends GT_ContainerMetaTile_Machine { if (aSlotIndex == 28) { ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, trans("116", "Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116", "Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("117", "Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117", "Don't emit Energy")); } return null; } diff --git a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java index 0b61a0910d..58df63e16a 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_Container_SuperBuffer.java @@ -36,36 +36,36 @@ public class GT_Container_SuperBuffer extends GT_ContainerMetaTile_Machine { if (aSlotIndex == 0) { ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) { - GT_Utility.sendChatToPlayer(aPlayer, trans("116","Emit Energy to Outputside")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("116","Emit Energy to Outputside")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("117","Don't emit Energy")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("117","Don't emit Energy")); } return null; } if (aSlotIndex == 1) { ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) { - GT_Utility.sendChatToPlayer(aPlayer, trans("118","Emit Redstone if no Slot is free")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("118","Emit Redstone if no Slot is free")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("119","Don't emit Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("119","Don't emit Redstone")); } return null; } if (aSlotIndex == 2) { ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) { - GT_Utility.sendChatToPlayer(aPlayer, trans("120","Invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("120","Invert Redstone")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("121","Don't invert Redstone")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("121","Don't invert Redstone")); } return null; } if (aSlotIndex == 3) { ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode); if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bStockingMode) { - GT_Utility.sendChatToPlayer(aPlayer, trans("217","Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("217","Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly.")); } else { - GT_Utility.sendChatToPlayer(aPlayer, trans("218", "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("218", "Transfer size mode. Add exactly this many items in destination input slots as long as there is room.")); } return null; } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java index c1efb6ab58..9d597c7f30 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java @@ -4,11 +4,14 @@ import gregtech.api.gui.GT_Container_MultiMachine; import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_Utility; +import gregtech.nei.NEI_TransferRectHost; import net.minecraft.entity.player.InventoryPlayer; +import java.awt.Rectangle; + import static gregtech.api.enums.GT_Values.RES_PATH_GUI; -public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machine { +public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machine implements NEI_TransferRectHost { public String mNEI; String mName = ""; @@ -56,4 +59,24 @@ public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machi drawTexturedModalRect(x + 5, y + 156, 0, 251, Math.min(147, (int) (tScale * 148)), 5); } } + + @Override + public String getNeiTransferRectString() { + return mNEI; + } + + @Override + public String getNeiTransferRectTooltip() { + return "Recipes"; + } + + @Override + public Object[] getNeiTransferRectArgs() { + return new Object[0]; + } + + @Override + public Rectangle getNeiTransferRect() { + return new Rectangle(149, -7, 18, 18); + } } diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java index d804b3858e..08ee0d125c 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_PrimitiveBlastFurnace.java @@ -4,9 +4,14 @@ import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; import gregtech.api.gui.widgets.GT_GuiIcon; import gregtech.api.gui.widgets.GT_GuiTabLine.GT_GuiTabIconSet; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.nei.NEI_TransferRectHost; import net.minecraft.entity.player.InventoryPlayer; -public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTile_Machine { private String name; +import java.awt.*; + +public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTile_Machine + implements NEI_TransferRectHost { + private String name; public String mNEI; private final static GT_GuiTabIconSet TAB_ICONSET = new GT_GuiTabIconSet( GT_GuiIcon.TAB_NORMAL_BRICK, @@ -43,4 +48,24 @@ public class GT_GUIContainer_PrimitiveBlastFurnace extends GT_GUIContainerMetaTi protected GT_GuiTabIconSet getTabBackground() { return TAB_ICONSET; } + + @Override + public String getNeiTransferRectString() { + return mNEI; + } + + @Override + public String getNeiTransferRectTooltip() { + return "Recipes"; + } + + @Override + public Object[] getNeiTransferRectArgs() { + return new Object[0]; + } + + @Override + public Rectangle getNeiTransferRect() { + return new Rectangle(51, 10, 24, 24); + } } diff --git a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java index 43186b9621..fb566cbeb7 100644 --- a/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java +++ b/src/main/java/gregtech/common/items/GT_FluidDisplayItem.java @@ -52,10 +52,10 @@ public class GT_FluidDisplayItem extends GT_Generic_Item { if (aNBT != null) { long tToolTipAmount = aNBT.getLong("mFluidDisplayAmount"); if (tToolTipAmount > 0L) { - aList.add(EnumChatFormatting.BLUE + String.format(trans("016", "Amount: %s L"), "" + tToolTipAmount) + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.BLUE + String.format(GT_Utility.trans("016", "Amount: %s L"), "" + tToolTipAmount) + EnumChatFormatting.GRAY); } - aList.add(EnumChatFormatting.RED + String.format(trans("017", "Temperature: %s K"), "" + aNBT.getLong("mFluidDisplayHeat")) + EnumChatFormatting.GRAY); - aList.add(EnumChatFormatting.GREEN + String.format(trans("018", "State: %s"), aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid") + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.RED + String.format(GT_Utility.trans("017", "Temperature: %s K"), "" + aNBT.getLong("mFluidDisplayHeat")) + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.GREEN + String.format(GT_Utility.trans("018", "State: %s"), aNBT.getBoolean("mFluidState") ? "Gas" : "Liquid") + EnumChatFormatting.GRAY); } } diff --git a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java index 852babb52a..d7de747ea7 100644 --- a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java +++ b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java @@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation; import gregtech.api.items.GT_Generic_Item; import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -36,9 +37,9 @@ public class GT_SensorCard_Item extends GT_Generic_Item implements IRemoteSensor if (aStack != null) { NBTTagCompound tNBT = aStack.getTagCompound(); if (tNBT == null) { - aList.add(trans("014", "Missing Coodinates!")); + aList.add(GT_Utility.trans("014", "Missing Coodinates!")); } else { - aList.add(trans("015", "Device at:")); + aList.add(GT_Utility.trans("015", "Device at:")); aList.add(String.format("x: %d, y: %d, z: %d", tNBT.getInteger("x"), tNBT.getInteger("y"), tNBT.getInteger("z"))); } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java index ad037ed13c..def807e0ba 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_None.java @@ -3,7 +3,7 @@ package gregtech.common.items.behaviors; import gregtech.api.enums.SubTag; import gregtech.api.interfaces.IItemBehaviour; import gregtech.api.items.GT_MetaBase_Item; -import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_Utility; import net.minecraft.block.BlockDispenser; import net.minecraft.dispenser.BehaviorDefaultDispenseItem; import net.minecraft.dispenser.IBlockSource; @@ -81,8 +81,9 @@ public class Behaviour_None implements IItemBehaviour<GT_MetaBase_Item> { public EntityArrow getProjectile(GT_MetaBase_Item aItem, SubTag aProjectileType, ItemStack aStack, World aWorld, EntityLivingBase aEntity, float aSpeed) { return null; } - + + @Deprecated public String trans(String aKey, String aEnglish){ - return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false); + return GT_Utility.trans(aKey, aEnglish); } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java index e56bd198b7..3b6474edb9 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Prospecting.java @@ -49,7 +49,7 @@ public class Behaviour_Prospecting extends Behaviour_None { ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(aBlock, 1, aMeta)); if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))){ - GT_Utility.sendChatToPlayer(aPlayer, trans("100","This is ") + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + trans("101"," Ore.")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("100","This is ") + tAssotiation.mMaterial.mMaterial.mDefaultLocalName + GT_Utility.trans("101"," Ore.")); GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(1), 1.0F, -1.0F, aX, aY, aZ); return true; } @@ -76,19 +76,19 @@ public class Behaviour_Prospecting extends Behaviour_None { tBlock = aWorld.getBlock(tX, tY, tZ); if (tBlock == Blocks.lava || tBlock == Blocks.flowing_lava) { - GT_Utility.sendChatToPlayer(aPlayer, trans("102","There is Lava behind this Rock.")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("102","There is Lava behind this Rock.")); break; < |
