From ede55e818ba0312f061e154402cd82ec4603480d Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Wed, 14 Aug 2019 20:04:13 +0100 Subject: + Attempted to add custom covers for Ztones blocks. Should close #521. --- .../xmod/gregtech/common/covers/CoverManager.java | 41 +++++++ .../common/covers/GTPP_Cover_ToggleVisual.java | 123 +++++++++++++++++++++ .../common/covers/GTPP_Cover_VisualPlate.java | 67 ----------- 3 files changed, 164 insertions(+), 67 deletions(-) create mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java create mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java delete mode 100644 src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_VisualPlate.java (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/covers') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java new file mode 100644 index 0000000000..b412e0fe60 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java @@ -0,0 +1,41 @@ +package gtPlusPlus.xmod.gregtech.common.covers; + +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_AGON; +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_BITT; +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_ISZM; +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_JELT; +import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_KORP; + +import cpw.mods.fml.common.Loader; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers; +import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem; + +public class CoverManager { + + //ZTones + public static MetaCustomCoverItem Cover_Agon; + public static MetaCustomCoverItem Cover_Iszm; + public static MetaCustomCoverItem Cover_Korp; + public static MetaCustomCoverItem Cover_Jelt; + public static MetaCustomCoverItem Cover_Bitt; + + + public static void generateCustomCovers() { + + // init textures + TexturesGtCutomCovers.init(); + + if (Loader.isModLoaded("Ztones")) { + String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" }; + MetaCustomCoverItem[] aZtoneCoverItems = new MetaCustomCoverItem[] { Cover_Agon, Cover_Iszm, Cover_Korp, Cover_Jelt, Cover_Bitt}; + CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT }; + for (int y=0;y sConnectionStateForEntityMap = new ConcurrentHashMap(); + private static final Map sPrefixMap = new ConcurrentHashMap(); + + public static String generateUniqueKey(byte aSide, ICoverable aEntity) { + try { + BlockPos aPos = new BlockPos(aEntity.getIGregTechTileEntity(aEntity.getXCoord(), aEntity.getYCoord(), aEntity.getZCoord())); + ForgeDirection aDir = ForgeDirection.getOrientation(aSide); + String s = aEntity.getInventoryName()+"."+aPos.getUniqueIdentifier()+aDir.name(); + return s; + } + catch (Throwable t) {} + XSTR x = new XSTR(); + return "ERROR."+x.getSeed()+x.hashCode()+x.nextDouble()+".ID"; + } + + public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + return true; + } + + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + EntityPlayer aPlayer, float aX, float aY, float aZ) { + return aCoverVariable; + } + + public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return getConnectionState(aSide, aTileEntity); + } + + public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return getConnectionState(aSide, aTileEntity); + } + + public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return getConnectionState(aSide, aTileEntity); + } + + public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { + return getConnectionState(aSide, aTileEntity); + } + + public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return getConnectionState(aSide, aTileEntity); + } + + public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { + return getConnectionState(aSide, aTileEntity); + } + + public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return this.trans("756", "Connectable: ") + getConnectionState(aSide, aTileEntity); + } + + public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return 0; + } + + @Override + public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + long aTimer) { + return aCoverVariable; + } + + @Override + public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return getConnectionState(aSide, aTileEntity); + } + + @Override + public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return getConnectionState(aSide, aTileEntity); + } + + @Override + public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { + return super.alwaysLookConnected(aSide, aCoverID, aCoverVariable, aTileEntity); + } + + @Override + public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, + ICoverable aTileEntity) { + if (!getConnectionState(aSide, aTileEntity)) { + return 0; + } + return super.getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity); + } + + @Override + public void placeCover(byte aSide, ItemStack aCover, ICoverable aTileEntity) { + String aKey = generateUniqueKey(aSide, aTileEntity); + sPrefixMap.put(aKey, aCover.getUnlocalizedName()); + sConnectionStateForEntityMap.put(aKey, MetaCustomCoverItem.getCoverConnections(aCover)); + super.placeCover(aSide, aCover, aTileEntity); + } + + @Override + public boolean onCoverRemoval(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, + boolean aForced) { + sConnectionStateForEntityMap.remove(generateUniqueKey(aSide, aTileEntity)); + return true; + } + + public static boolean getConnectionState(byte aSide, ICoverable aTile) { + return sConnectionStateForEntityMap.get(generateUniqueKey(aSide, aTile)); + } +} \ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_VisualPlate.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_VisualPlate.java deleted file mode 100644 index 7d2ed2c21a..0000000000 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_VisualPlate.java +++ /dev/null @@ -1,67 +0,0 @@ -package gtPlusPlus.xmod.gregtech.common.covers; - -import gregtech.api.interfaces.tileentity.ICoverable; -import gregtech.api.util.GT_CoverBehavior; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraftforge.fluids.Fluid; - -public class GTPP_Cover_VisualPlate extends GT_CoverBehavior { - - public GTPP_Cover_VisualPlate() { - } - - public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { - return aCoverVariable; - } - - public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - return aCoverVariable; - } - - public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { - return true; - } - - public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return false; - } - - public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return false; - } - - public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return false; - } - - public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return false; - } - - public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } - - public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return false; - } - - public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return false; - } - - public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return false; - } - - public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return false; - } - - public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return 0; - } -} \ No newline at end of file -- cgit From b5e6865373c48ce444b5c3e09335ca50945eba8e Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 15 Aug 2019 03:33:28 +0100 Subject: + Re-added Tiered Machine Covers. (Old ones will be deprecated) Closes #516. + Added extra tiered covers. (For use in GTNH mostly) + Added textures and colour coding for Ztones covers. + Localized some cover names. --- .../xmod/gregtech/common/covers/CoverManager.java | 85 +++++++++++++++++++--- .../common/covers/GTPP_Cover_ToggleVisual.java | 32 ++++++-- 2 files changed, 99 insertions(+), 18 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/covers') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java index b412e0fe60..2fba1b0448 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java @@ -7,35 +7,96 @@ import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCov import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_KORP; import cpw.mods.fml.common.Loader; +import gtPlusPlus.core.lib.VanillaColours; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers; import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem; +import gtPlusPlus.xmod.gregtech.common.items.covers.MetaItemCoverCasings; public class CoverManager { - - //ZTones + + // ZTones public static MetaCustomCoverItem Cover_Agon; public static MetaCustomCoverItem Cover_Iszm; public static MetaCustomCoverItem Cover_Korp; public static MetaCustomCoverItem Cover_Jelt; public static MetaCustomCoverItem Cover_Bitt; - + + // GT + public static MetaItemCoverCasings Cover_Gt_Machine_Casing; public static void generateCustomCovers() { // init textures TexturesGtCutomCovers.init(); - + + // GT Machine Casings + Cover_Gt_Machine_Casing = new MetaItemCoverCasings(); + if (Loader.isModLoaded("Ztones")) { String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" }; - MetaCustomCoverItem[] aZtoneCoverItems = new MetaCustomCoverItem[] { Cover_Agon, Cover_Iszm, Cover_Korp, Cover_Jelt, Cover_Bitt}; - CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP, TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT }; - for (int y=0;y Date: Thu, 15 Aug 2019 07:55:35 +0100 Subject: + Attempted to add a buggy NEI page for decayable dusts. + Added a way to disable ALL GT++ logging in the ASM config file. + Added recipes for Ztones covers. % Adjusted recipes for Tiered machine covers. % Updated GT++ debug command to toggle logging if desired. (Useful in-game). $ Fixed bug where smart covers would lose their state. --- .../common/covers/GTPP_Cover_ToggleVisual.java | 84 ++++++++++++++++------ 1 file changed, 63 insertions(+), 21 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/covers') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java index 7e5b07916e..561da54ceb 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java @@ -4,11 +4,12 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import gregtech.api.interfaces.tileentity.ICoverable; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.util.GT_CoverBehavior; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.api.objects.random.XSTR; -import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem; +import gtPlusPlus.core.util.minecraft.PlayerUtils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -17,9 +18,11 @@ import net.minecraftforge.fluids.Fluid; public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { - private static final Map sConnectionStateForEntityMap = new ConcurrentHashMap(); + private static final Map sConnectionStateForEntityMap = new ConcurrentHashMap(); private static final Map sPrefixMap = new ConcurrentHashMap(); - + private static final int VALUE_OFF = 0; + private static final int VALUE_ON = 1; + public static String generateUniqueKey(byte aSide, ICoverable aEntity) { try { BlockPos aPos = new BlockPos(aEntity.getIGregTechTileEntity(aEntity.getXCoord(), aEntity.getYCoord(), aEntity.getZCoord())); @@ -33,7 +36,8 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { } public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - EntityPlayer aPlayer, float aX, float aY, float aZ) { + EntityPlayer aPlayer, float aX, float aY, float aZ) { + PlayerUtils.messagePlayer(aPlayer, this.trans("756", "Connectable: ") + getConnectionState(aCoverVariable)); return super.onCoverRightclick(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); } @@ -43,31 +47,31 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { } public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return getConnectionState(aSide, aTileEntity); + return getConnectionState(aCoverVariable); } public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return getConnectionState(aSide, aTileEntity); + return getConnectionState(aCoverVariable); } public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return getConnectionState(aSide, aTileEntity); + return getConnectionState(aCoverVariable); } public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - return getConnectionState(aSide, aTileEntity); + return getConnectionState(aCoverVariable); } public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return getConnectionState(aSide, aTileEntity); + return getConnectionState(aCoverVariable); } public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) { - return getConnectionState(aSide, aTileEntity); + return getConnectionState(aCoverVariable); } public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return this.trans("756", "Connectable: ") + getConnectionState(aSide, aTileEntity); + return this.trans("756", "Connectable: ") + getConnectionState(aCoverVariable); } public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { @@ -76,18 +80,34 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { @Override public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, - long aTimer) { + long aTimer) { + try { + String aKey = generateUniqueKey(aSide, aTileEntity); + Integer b = sConnectionStateForEntityMap.get(aKey); + //Logger.INFO("Val: "+aCoverVariable); + if (b != null && aCoverVariable != b) { + aCoverVariable = b; + } + if (b == null) { + b = aCoverVariable; + sConnectionStateForEntityMap.put(aKey, b); + trySetState(aSide, b == VALUE_ON ? VALUE_ON : VALUE_OFF, aTileEntity); + } + } + catch (Throwable t) { + + } return aCoverVariable; } @Override public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return getConnectionState(aSide, aTileEntity); + return getConnectionState(aCoverVariable); } @Override public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return getConnectionState(aSide, aTileEntity); + return getConnectionState(aCoverVariable); } @Override @@ -98,7 +118,7 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { @Override public byte getRedstoneInput(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - if (!getConnectionState(aSide, aTileEntity)) { + if (!getConnectionState(aCoverVariable)) { return 0; } return super.getRedstoneInput(aSide, aInputRedstone, aCoverID, aCoverVariable, aTileEntity); @@ -109,8 +129,11 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { String aKey = generateUniqueKey(aSide, aTileEntity); boolean state = getCoverConnections(aCover); sPrefixMap.put(aKey, aCover.getUnlocalizedName()); - //Logger.INFO("Mapping key "+aKey+" to "+state); - sConnectionStateForEntityMap.put(aKey, state); + Logger.INFO("Mapping key "+aKey+" to "+state); + sConnectionStateForEntityMap.put(aKey, state ? VALUE_ON : VALUE_OFF); + Logger.INFO("Key Value: "+(state ? VALUE_ON : VALUE_OFF)); + //Try set cover state directly + //trySetState(aSide, state ? VALUE_ON : VALUE_OFF, aTileEntity); super.placeCover(aSide, aCover, aTileEntity); } @@ -122,14 +145,33 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { //Logger.INFO("Unmapping key "+aKey+"."); return true; } - + + public static boolean getConnectionState(int aCoverVar) { + return aCoverVar == VALUE_ON; + } + + private static final void trySetState(byte aSide, int aState, ICoverable aTile) { + //Try set cover state directly + if (aTile instanceof IGregTechTileEntity) { + IGregTechTileEntity gTileEntity = (IGregTechTileEntity) aTile; + if (gTileEntity != null) { + gTileEntity.setCoverDataAtSide(aSide, aState); + } + } + } + + public static boolean getConnectionState(byte aSide, ICoverable aTile) { String aKey = generateUniqueKey(aSide, aTile); - boolean b = sConnectionStateForEntityMap.get(aKey); - //Logger.INFO("Get State: "+b+" | "+aKey); - return b; + return getConnectionState(aKey); } + public static boolean getConnectionState(String aKey) { + Integer b = sConnectionStateForEntityMap.get(aKey); + //Logger.INFO("Get State: "+b+" | "+aKey); + return b != null ? b == VALUE_ON : false; + } + public static final boolean getCoverConnections(final ItemStack aStack) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { -- cgit From b8069dc5a8c0c8c2cfd5e4ec2401f28d6a84e626 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Thu, 12 Dec 2019 02:26:10 +0000 Subject: + Added Pellet Mold. + Added Clean Aluminium Mix. $ 5.08 Compliance. And looooots of it. $ Fixed most, if not all Fluid Canning & Extraction recipes that I broke previously. % Adjusted Textures for Particles. New textures thanks to Discord User Никита#8621. % Adjusted Aluminium Processing Chain. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/covers') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java index 561da54ceb..65b59ce151 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_ToggleVisual.java @@ -9,6 +9,7 @@ import gregtech.api.util.GT_CoverBehavior; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.api.objects.random.XSTR; +import gtPlusPlus.core.util.minecraft.LangUtils; import gtPlusPlus.core.util.minecraft.PlayerUtils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -37,7 +38,7 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - PlayerUtils.messagePlayer(aPlayer, this.trans("756", "Connectable: ") + getConnectionState(aCoverVariable)); + PlayerUtils.messagePlayer(aPlayer, LangUtils.trans("756", "Connectable: ") + getConnectionState(aCoverVariable)); return super.onCoverRightclick(aSide, aCoverID, aCoverVariable, aTileEntity, aPlayer, aX, aY, aZ); } @@ -71,7 +72,7 @@ public class GTPP_Cover_ToggleVisual extends GT_CoverBehavior { } public String getDescription(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { - return this.trans("756", "Connectable: ") + getConnectionState(aCoverVariable); + return LangUtils.trans("756", "Connectable: ") + getConnectionState(aCoverVariable); } public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { -- cgit