parent
480e087bf0
commit
a205cbccd0
1 changed files with 8 additions and 4 deletions
|
@ -138,6 +138,10 @@ public class GT_OreDictUnificator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack get(boolean aUseBlackList, ItemStack aStack) {
|
public static ItemStack get(boolean aUseBlackList, ItemStack aStack) {
|
||||||
|
return get(aUseBlackList, aStack, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ItemStack get(boolean aUseBlackList, ItemStack aStack, boolean aOnUnificationTableCreation) {
|
||||||
if (GT_Utility.isStackInvalid(aStack)) return null;
|
if (GT_Utility.isStackInvalid(aStack)) return null;
|
||||||
ItemData tPrefixMaterial = getAssociation(aStack);
|
ItemData tPrefixMaterial = getAssociation(aStack);
|
||||||
ItemStack rStack = null;
|
ItemStack rStack = null;
|
||||||
|
@ -149,7 +153,7 @@ public class GT_OreDictUnificator {
|
||||||
}
|
}
|
||||||
if (tPrefixMaterial.mUnificationTarget == null) {
|
if (tPrefixMaterial.mUnificationTarget == null) {
|
||||||
tPrefixMaterial.mUnificationTarget = sName2StackMap.get(tPrefixMaterial.toString());
|
tPrefixMaterial.mUnificationTarget = sName2StackMap.get(tPrefixMaterial.toString());
|
||||||
sUnificationTable.clear();
|
if (!aOnUnificationTableCreation) sUnificationTable.clear();
|
||||||
}
|
}
|
||||||
rStack = tPrefixMaterial.mUnificationTarget;
|
rStack = tPrefixMaterial.mUnificationTarget;
|
||||||
if (GT_Utility.isStackInvalid(rStack)) return GT_Utility.copy(aStack);
|
if (GT_Utility.isStackInvalid(rStack)) return GT_Utility.copy(aStack);
|
||||||
|
@ -163,8 +167,8 @@ public class GT_OreDictUnificator {
|
||||||
if (sUnificationTable.isEmpty() && !sItemStack2DataMap.isEmpty()) {
|
if (sUnificationTable.isEmpty() && !sItemStack2DataMap.isEmpty()) {
|
||||||
for (GT_ItemStack tGTStack0 : sItemStack2DataMap.keySet()) {
|
for (GT_ItemStack tGTStack0 : sItemStack2DataMap.keySet()) {
|
||||||
ItemStack tStack0 = tGTStack0.toStack();
|
ItemStack tStack0 = tGTStack0.toStack();
|
||||||
ItemStack tStack1 = get(false, tStack0);
|
ItemStack tStack1 = get(false, tStack0, true);
|
||||||
if (!GT_Utility.areStacksEqual(tStack0, tStack1)) {
|
if (tStack0 != null && tStack1 != null && !GT_Utility.areStacksEqual(tStack0, tStack1)) {
|
||||||
GT_ItemStack tGTStack1 = new GT_ItemStack(tStack1);
|
GT_ItemStack tGTStack1 = new GT_ItemStack(tStack1);
|
||||||
List<ItemStack> list = sUnificationTable.get(tGTStack1);
|
List<ItemStack> list = sUnificationTable.get(tGTStack1);
|
||||||
if (list == null) sUnificationTable.put(tGTStack1, list = new ArrayList<ItemStack>());
|
if (list == null) sUnificationTable.put(tGTStack1, list = new ArrayList<ItemStack>());
|
||||||
|
|
Loading…
Reference in a new issue