diff options
author | Martin Robertz <dream-master@gmx.net> | 2021-12-12 19:09:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-12 19:09:46 +0100 |
commit | 896143b96132f5ac54aa8d8f7386f27487e5e530 (patch) | |
tree | d61c1bced93b36545873414562b1dfd80718f496 /src/Java/gtPlusPlus/core/commands | |
parent | 9cbfc7a1bacdbe908632e0fff9ec5ad7f119e563 (diff) | |
parent | 35585d4556d85a1a9cda33cdd39b5b257e3e5215 (diff) | |
download | GT5-Unofficial-896143b96132f5ac54aa8d8f7386f27487e5e530.tar.gz GT5-Unofficial-896143b96132f5ac54aa8d8f7386f27487e5e530.tar.bz2 GT5-Unofficial-896143b96132f5ac54aa8d8f7386f27487e5e530.zip |
Merge pull request #50 from GTNewHorizons/gtnh-milling
Milling/Nuclear Sciences revamp + Lots of minor fixes
Diffstat (limited to 'src/Java/gtPlusPlus/core/commands')
-rw-r--r-- | src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java index c9cdc41424..493b7d415d 100644 --- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java +++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java @@ -4,8 +4,10 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import cpw.mods.fml.common.registry.GameRegistry; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; +import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.FluidUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; @@ -105,6 +107,20 @@ public class CommandEnableDebugWhileRunning implements ICommand PlayerUtils.messagePlayer(P, ItemUtils.getItemName(mSemiFluidgen)); } }*/ + + else if (argString[0].toLowerCase().equals("inv")) { + final EntityPlayer P = CommandUtils.getPlayer(S); + if (P != null && !P.worldObj.isRemote) { + ItemStack[] aInv = P.inventory.mainInventory; + for (ItemStack aItem : aInv) { + if (aItem != null) { + String aModID = GameRegistry.findUniqueIdentifierFor(aItem.getItem()).modId; + String aRegistryName = GameRegistry.findUniqueIdentifierFor(aItem.getItem()).name; + Logger.INFO(aModID+":"+aRegistryName); + } + } + } + } else if (argString[0].toLowerCase().equals("hand")) { final EntityPlayer P = CommandUtils.getPlayer(S); if (P != null) { @@ -133,15 +149,21 @@ public class CommandEnableDebugWhileRunning implements ICommand } } - String aFluidContainerData = ""; + AutoMap<String> aFluidContainerData = new AutoMap<String>(); FluidStack aHeldItemFluid = FluidContainerRegistry.getFluidForFilledItem(aHeldItem); if (aHeldItemFluid != null) { - aFluidContainerData = "["+aHeldItemFluid.getUnlocalizedName()+"]["+aHeldItemFluid.getLocalizedName()+"]"; + aFluidContainerData.put("FluidStack Unlocal Name: "+aHeldItemFluid.getUnlocalizedName()); + aFluidContainerData.put("FluidStack Local Name: "+aHeldItemFluid.getLocalizedName()); + aFluidContainerData.put("Fluid Unlocal Name: "+aHeldItemFluid.getFluid().getUnlocalizedName()); + aFluidContainerData.put("Fluid Local Name: "+aHeldItemFluid.getFluid().getLocalizedName()); + aFluidContainerData.put("Fluid Name: "+aHeldItemFluid.getFluid().getName()); } PlayerUtils.messagePlayer(P, "["+aItemUnlocalName+"]"+"["+aItemDisplayName+"] "); - if (aFluidContainerData.length() > 0) { - PlayerUtils.messagePlayer(P, ""+aFluidContainerData); + if (aFluidContainerData.size() > 0) { + for (String s : aFluidContainerData) { + PlayerUtils.messagePlayer(P, ""+s); + } } if (!aOreDictNames.isEmpty()) { PlayerUtils.messagePlayer(P, ""+aOreDictData); |