aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorAlkalus <Draknyte1@hotmail.com>2020-03-28 02:09:24 +0000
committerAlkalus <Draknyte1@hotmail.com>2020-03-28 02:09:24 +0000
commitf39e8134fcef5da8bd04503c5233b2b6de249b3a (patch)
tree5713706bbff562e41ee5ebb4c896f5beab6e396d /src/Java/gtPlusPlus/core/util
parent0678527ea975b4a95eb7f3d6547b79865b0a2a0e (diff)
downloadGT5-Unofficial-f39e8134fcef5da8bd04503c5233b2b6de249b3a.tar.gz
GT5-Unofficial-f39e8134fcef5da8bd04503c5233b2b6de249b3a.tar.bz2
GT5-Unofficial-f39e8134fcef5da8bd04503c5233b2b6de249b3a.zip
+ 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.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/Utils.java16
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java74
2 files changed, 37 insertions, 53 deletions
diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java
index 234b54d2d2..72b13b3067 100644
--- a/src/Java/gtPlusPlus/core/util/Utils.java
+++ b/src/Java/gtPlusPlus/core/util/Utils.java
@@ -935,22 +935,6 @@ public class Utils {
return false;
}
- public static ItemList getValueOfItemList(String string, ItemList aOther) {
- ItemList[] aListValues = ItemList.class.getEnumConstants();
- for (ItemList aItem : aListValues) {
- if (aItem != null) {
- if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) {
- return aItem;
- }
- }
- }
- Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist.");
- if (aOther != null) {
- Logger.INFO("Using fallback option instead - "+aOther.name());
- }
- return aOther;
- }
-
public static long getMillisSince(long aStartTime, long aCurrentTime) {
return (aCurrentTime - aStartTime);
}
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
index d7d611a1e4..cd5b98557b 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
@@ -42,7 +42,6 @@ import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_DustGeneration;
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentData;
-import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
@@ -1220,7 +1219,6 @@ public class ItemUtils {
return GT_Values.NI;
}
-
public static ItemStack depleteStack(ItemStack aStack) {
return depleteStack(aStack, 1);
}
@@ -1235,41 +1233,6 @@ public class ItemUtils {
}
return getNullStack();
}
-
- public static ItemStack getItemListObject(String aObjectFromExperimentalName, String aReplacementName, int aAmount) {
- ItemList aItemListObject = getItemListObject(aObjectFromExperimentalName, aReplacementName);
- if (aItemListObject == ItemList.NULL || aItemListObject == null) {
- return null;
- }
- else {
- return aItemListObject.get(aAmount);
- }
- }
-
- public static ItemStack getItemListObject(ItemList aItemListObject, int aAmount) {
- if (aItemListObject == ItemList.NULL || aItemListObject == null) {
- return null;
- }
- else {
- return aItemListObject.get(aAmount);
- }
- }
-
- public static ItemList getItemListObject(String aObjectFromExperimentalName, String aReplacementName) {
- ItemList aVal = ItemList.valueOf(aObjectFromExperimentalName);
- if (aVal != null) {
- return aVal;
- }
- else {
- aVal = ItemList.valueOf(aReplacementName);
- if (aVal != null) {
- return aVal;
- }
- else {
- return ItemList.NULL;
- }
- }
- }
public static boolean isControlCircuit(ItemStack aStack) {
if (aStack != null) {
@@ -1313,5 +1276,42 @@ public class ItemUtils {
public static String getLocalizedNameOfBlock(Block aBlock, int aMeta) {
return LangUtils.getLocalizedNameOfBlock(aBlock, aMeta);
}
+
+
+
+ public static ItemList getValueOfItemList(String string, ItemList aOther) {
+ ItemList[] aListValues = ItemList.class.getEnumConstants();
+ for (ItemList aItem : aListValues) {
+ if (aItem != null) {
+ if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) {
+ return aItem;
+ }
+ }
+ }
+ Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist.");
+ if (aOther != null) {
+ Logger.INFO("Using fallback option instead - "+aOther.name());
+ }
+ return aOther;
+ }
+ public static ItemStack getValueOfItemList(String string, int aAmount, ItemList aOther) {
+ return getValueOfItemList(string, aOther).get(aAmount);
+ }
+
+ public static ItemStack getValueOfItemList(String string, int aAmount, ItemStack aOther) {
+ ItemList[] aListValues = ItemList.class.getEnumConstants();
+ for (ItemList aItem : aListValues) {
+ if (aItem != null) {
+ if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) {
+ return aItem.get(aAmount);
+ }
+ }
+ }
+ Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist.");
+ if (aOther != null) {
+ Logger.INFO("Using fallback option instead - "+ItemUtils.getItemName(aOther));
+ }
+ return aOther;
+ }
}