Port GT6 TC load time improvements

This commit is contained in:
Blood-Asp 2016-08-31 14:22:00 +02:00
parent 8086832d88
commit b4049e88a2

View file

@ -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;
}