diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-25 04:34:06 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-25 04:34:06 +0000 |
commit | 499411aa21ac4a742b6d51ef3ce9c4046d0a22c1 (patch) | |
tree | 98b94f327948b00e962ea0c7146dbd0034b4ede3 /src/Java/gtPlusPlus/core/util | |
parent | 86bf45662a877c8ce9ca9551b41c789c098dc698 (diff) | |
download | GT5-Unofficial-499411aa21ac4a742b6d51ef3ce9c4046d0a22c1.tar.gz GT5-Unofficial-499411aa21ac4a742b6d51ef3ce9c4046d0a22c1.tar.bz2 GT5-Unofficial-499411aa21ac4a742b6d51ef3ce9c4046d0a22c1.zip |
+ Added recipes to obtain Astral Titanium, Celestial Tungsten Advanced Nitinol and Chromatic Glass.
+ Added Particle Physics, so some basic extent.
+ Added new textures for some Meta items.
+ Added new textures for all particles and ions.
+ Added Custom Debug NBT to error ingots, in the event one is obtained by a player.
+ Added more information to the tooltip of Control Cores.
+ Added more uniform ways to obtain tiered item components to CI.
- Hard disable of GC Fuel tweaks for the moment.
% Hopefully greatly improved the cape handler. Cape list is now stored on Overmind's site, meaning it can be updated outside of the mod.
% Cape Handler now will store the cape data locally in a .dat for offline use, this can be updated anytime by removing it, or once a week if outdated)
% Tweaked Cyclotron Recipe map to support new changes to functionality.
% Tweaked RTG fuel pellet production time in Cyclotron to be 100x.
% Adjusted requirements for Quicklime to generate (It may vanish after this commit, May be worth rolling back if an issue.).
% Adjusted code to use checkForInvalidItems instead of direct item comparisons in several places.
% Renamed Buffer Cores to Energy Cores.
% Adjusted recipes for Energy Cores and Energy Buffers, they now require 6 slot assembly.
$ Fixed Multiblock handling during structure checks, they'd accidentally detect the controller as an invalid block.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/Utils.java | 5 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java | 29 |
2 files changed, 19 insertions, 15 deletions
diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index e2220f74f8..968de2f55a 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -485,7 +485,10 @@ public class Utils { return true; } - public static File getMcDir() { + public static File getMcDir() { + if (Minecraft.getMinecraft() == null) { + return new File("testdir"); + } if ((MinecraftServer.getServer() != null) && MinecraftServer.getServer().isDedicatedServer()) { return new File("."); } diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java index 425606dd8e..1cb2513e90 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java @@ -10,7 +10,9 @@ import net.minecraft.init.Items; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import gregtech.api.enums.ItemList; @@ -315,7 +317,7 @@ public class ItemUtils { return returnValue; } Logger.INFO("Failed to find `" + oredictName + "` in OD."); - return getErrorStack(amount); + return getErrorStack(amount, oredictName+" x"+amount); //return getItemStackOfAmountFromOreDictNoBroken(mTemp, amount); } @@ -366,8 +368,7 @@ public class ItemUtils { public static ItemStack getGregtechDust(final Materials material, final int amount) { final ItemStack returnValue = GT_OreDictUnificator.get(OrePrefixes.dust, material, 1L); if (returnValue != null) { - if ((returnValue.getItem().getClass() != ModItems.AAA_Broken.getClass()) - || (returnValue.getItem() != ModItems.AAA_Broken)) { + if (ItemUtils.checkForInvalidItems(returnValue)) { return returnValue.copy(); } } @@ -762,23 +763,23 @@ public class ItemUtils { if (aGtStack == null) { Logger.INFO( "Failed to find `" + mPrefix + MaterialUtils.getMaterialName(mMat) + "` in OD. [Prefix Search]"); - return getErrorStack(mAmount); + return getErrorStack(mAmount, (mPrefix.toString()+MaterialUtils.getMaterialName(mMat)+" x"+mAmount)); } else { return aGtStack; } } - public static ItemStack getErrorStack(int mAmount) { - //System.exit(1); - try { - //new GregtechException("Logging - [Issue #999]"); - } - catch (Throwable t) { - t.printStackTrace(); - } + public static ItemStack getErrorStack(int mAmount) { + return getErrorStack(mAmount, null); + } - return getSimpleStack(ModItems.AAA_Broken, mAmount); - //return null; + public static ItemStack getErrorStack(int mAmount, String aName) { + ItemStack g = getSimpleStack(ModItems.AAA_Broken, 1); + NBTUtils.setString(g, "Lore", EnumChatFormatting.RED+aName); + if (aName != null) { + NBTUtils.setBookTitle(g, EnumChatFormatting.YELLOW+"Maybe Alkalus should know about this"); + } + return g; } public static ItemStack[] getStackOfAllOreDictGroup(String oredictname) { |