Port GT6 TC load time improvements
This commit is contained in:
parent
8086832d88
commit
b4049e88a2
1 changed files with 18 additions and 25 deletions
|
@ -192,27 +192,20 @@ public class GT_ThaumcraftCompat
|
|||
}
|
||||
|
||||
public boolean registerThaumcraftAspectsToItem(ItemStack aExampleStack, List<TC_Aspects.TC_AspectStack> aAspects, String aOreDict) {
|
||||
if (aAspects.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
AspectList tAlreadyRegisteredAspects = ThaumcraftApiHelper.getObjectAspects(aExampleStack);
|
||||
if ((tAlreadyRegisteredAspects == null) || (tAlreadyRegisteredAspects.size() <= 0)) {
|
||||
ThaumcraftApi.registerObjectTag(aOreDict, getAspectList(aAspects));
|
||||
}
|
||||
if (aAspects.isEmpty()) return false;
|
||||
ThaumcraftApi.registerObjectTag(aOreDict, (AspectList)getAspectList(aAspects));
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean registerThaumcraftAspectsToItem(ItemStack aStack, List<TC_Aspects.TC_AspectStack> aAspects, boolean aAdditive) {
|
||||
if (aAspects.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
if (aAspects.isEmpty()) return false;
|
||||
if (aAdditive) {
|
||||
ThaumcraftApi.registerComplexObjectTag(aStack, getAspectList(aAspects));
|
||||
ThaumcraftApi.registerComplexObjectTag(aStack, (AspectList)getAspectList(aAspects));
|
||||
return true;
|
||||
}
|
||||
AspectList tAlreadyRegisteredAspects = ThaumcraftApiHelper.getObjectAspects(aStack);
|
||||
if ((tAlreadyRegisteredAspects == null) || (tAlreadyRegisteredAspects.size() <= 0)) {
|
||||
ThaumcraftApi.registerObjectTag(aStack, getAspectList(aAspects));
|
||||
if (tAlreadyRegisteredAspects == null || tAlreadyRegisteredAspects.size() <= 0) {
|
||||
ThaumcraftApi.registerObjectTag(aStack, (AspectList)getAspectList(aAspects));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue