From f39e8134fcef5da8bd04503c5233b2b6de249b3a Mon Sep 17 00:00:00 2001 From: Alkalus Date: Sat, 28 Mar 2020 02:09:24 +0000 Subject: + Added more 'Special Behaviour' items for my multiblocks as Examples. + Added '/gtpp hand' command. + Added TungstenSteel & Neutronium tool variants to NEI while in dev. + Added Large Semifluid Generator and a crafting recipe for it. + Added Placeholder for Adv. Assembly Line. + Added Distillus Upgrade Chip and a crafting recipe for it. % Updated build.gradle. % Reworked a few recipes. $ Fixed ULV Overflow Covers using 0L Water in assembler. (https://github.com/GTNewHorizons/NewHorizons/issues/5700) $ Fixed Integral Encasement I using 0L Steel in assembler. (https://github.com/GTNewHorizons/NewHorizons/issues/5617) $ Fixed Thaumcraft based FakePlayer's triggering Fluorite drops. (https://github.com/GTNewHorizons/NewHorizons/issues/5744) $ Fixed bad handling of hatch textures on a few multiblocks. $ Semi-Fixed Distillus. $ Fixed Semifluid Generator recipes. $ Fixed Semifluid Generators crashing the game when mined. $ Fixed bad handling of calls to ItemList.java. $ Began work fixing all ASM to be more compatible with ProGuard. $ Fixed compiler complaining about varargs. ^ Bumped version to 1.7.05.x. --- .../commands/CommandEnableDebugWhileRunning.java | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'src/Java/gtPlusPlus/core/commands') diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java index 06b6f14822..adcaa1db70 100644 --- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java +++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java @@ -2,15 +2,22 @@ package gtPlusPlus.core.commands; import java.util.ArrayList; import java.util.List; +import java.util.Map; 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.ItemUtils; +import gtPlusPlus.core.util.minecraft.NBTUtils; import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.reflect.ReflectionUtils; import gtPlusPlus.preloader.asm.AsmConfig; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; @@ -84,6 +91,27 @@ public class CommandEnableDebugWhileRunning implements ICommand AsmConfig.disableAllLogging = Utils.invertBoolean(AsmConfig.disableAllLogging); PlayerUtils.messagePlayer(P, "Toggled GT++ Logging - Enabled: "+(!AsmConfig.disableAllLogging)); } + /* else if (argString[0].toLowerCase().equals("test")) { + ItemStack mSemiFluidgen = ItemUtils.simpleMetaStack("IC2:blockGenerator", 7, 1); + final EntityPlayer P = CommandUtils.getPlayer(S); + if(mSemiFluidgen != null) { + PlayerUtils.messagePlayer(P, ItemUtils.getItemName(mSemiFluidgen)); + } + }*/ + else if (argString[0].toLowerCase().equals("hand")) { + final EntityPlayer P = CommandUtils.getPlayer(S); + if (P != null) { + ItemStack aHeldItem = PlayerUtils.getItemStackInPlayersHand(P); + if (aHeldItem != null) { + String aItemDisplayName = ItemUtils.getItemName(aHeldItem); + String aNbtString = tryIterateNBTData(aHeldItem); + PlayerUtils.messagePlayer(P, "["+aItemDisplayName+"] "+aNbtString); + } + else { + PlayerUtils.messagePlayer(P, "No item held."); + } + } + } else { final EntityPlayer P = CommandUtils.getPlayer(S); PlayerUtils.messagePlayer(P, "Invalid command, use '?' as an argument for help.'"); @@ -117,5 +145,35 @@ public class CommandEnableDebugWhileRunning implements ICommand public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost){ return true; } + + public static String tryIterateNBTData(ItemStack aStack) { + try { + AutoMap aItemDataTags = new AutoMap(); + NBTTagCompound aNBT = NBTUtils.getNBT(aStack); + if (aNBT != null) { + if (!aNBT.hasNoTags()) { + Map mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); + if (mInternalMap != null) { + for (Map.Entry e : mInternalMap.entrySet()) { + aItemDataTags.add(e.getKey().toString()+":"+e.getValue()); + } + int a = 0; + String data = ""; + for (String tag : aItemDataTags) { + data += (tag+","); + } + if (data.endsWith(",")) { + data = data.substring(0, data.length()-2); + } + return data; + } else { + Logger.INFO("Data map reflected from NBTTagCompound was not valid."); + return "Bad NBT"; + } + } + } + } catch (Throwable t) {} + return ""; + } } \ No newline at end of file -- cgit From a3c8210a4318f34cbe46306cb1c829f41650515d Mon Sep 17 00:00:00 2001 From: Alkalus Date: Sat, 28 Mar 2020 20:32:11 +0000 Subject: + Added Materials for the new LNR fuels. + Added a new casing block class for special handled multiblock casings. + Added locale for Naq Fuel Cells. $ Reworked TAE. There are now 19 texture slots free out of the 64 total. $ Fixed a minor bug in the update checker. --- src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Java/gtPlusPlus/core/commands') diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java index adcaa1db70..5e0a5594d5 100644 --- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java +++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java @@ -104,8 +104,9 @@ public class CommandEnableDebugWhileRunning implements ICommand ItemStack aHeldItem = PlayerUtils.getItemStackInPlayersHand(P); if (aHeldItem != null) { String aItemDisplayName = ItemUtils.getItemName(aHeldItem); + String aItemUnlocalName = ItemUtils.getUnlocalizedItemName(aHeldItem); String aNbtString = tryIterateNBTData(aHeldItem); - PlayerUtils.messagePlayer(P, "["+aItemDisplayName+"] "+aNbtString); + PlayerUtils.messagePlayer(P, "["+aItemUnlocalName+"]"+"["+aItemDisplayName+"] "+aNbtString); } else { PlayerUtils.messagePlayer(P, "No item held."); -- cgit From 75ea33600537047847091b55a46f5b88c3c75dbb Mon Sep 17 00:00:00 2001 From: Alkalus Date: Tue, 31 Mar 2020 01:25:58 +0100 Subject: + Added Custom NEI Handler for IsaMIll. + Added Death by IsaMIll. % Moved debug mode switch to AsmConfig. $ Fixed handling of custom OrePrefixes. $ Fixed OreDict registration of MetaFoodItems. $ Improved handling of Core Classes being static initialised too early. $ Fixed client-side bug in Distillus which would cause an infinite loop. $ Fixed bug in ForgeEnumHelper. $ Fixed bug in setField methods from ReflectionUtils. --- .../gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Java/gtPlusPlus/core/commands') diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java index 5e0a5594d5..903730f767 100644 --- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java +++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java @@ -6,12 +6,12 @@ import java.util.Map; 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.ItemUtils; import gtPlusPlus.core.util.minecraft.NBTUtils; import gtPlusPlus.core.util.minecraft.PlayerUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; +import gtPlusPlus.preloader.CORE_Preloader; import gtPlusPlus.preloader.asm.AsmConfig; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; @@ -81,8 +81,8 @@ public class CommandEnableDebugWhileRunning implements ICommand Logger.INFO("Toggling Debug Mode."); final EntityPlayer P = CommandUtils.getPlayer(S); if (PlayerUtils.isPlayerOP(P)) { - CORE.DEBUG = Utils.invertBoolean(CORE.DEBUG); - PlayerUtils.messagePlayer(P, "Toggled GT++ Debug Mode - Enabled: "+CORE.DEBUG); + CORE_Preloader.DEBUG_MODE = Utils.invertBoolean(CORE_Preloader.DEBUG_MODE); + PlayerUtils.messagePlayer(P, "Toggled GT++ Debug Mode - Enabled: "+CORE_Preloader.DEBUG_MODE); } } else if (argString[0].toLowerCase().equals("logging")) { -- cgit