mirror of
https://github.com/GTNewHorizons/IguanaTweaksTConstruct.git
synced 2026-11-27 23:33:06 +00:00
Part replacement correctly adds missing boost-xp on upgrading, but disallows downgrading to stone-level-heads.
This commit is contained in:
1 parent
cbe3579066
commit
5dd86d613b
2 files changed
+21
-9
No files matched your search
@@ -100,6 +100,11 @@ public class ModPartReplacement extends ItemModifier {
|
||||
for(int i = partIndex; i > 0; i--)
|
||||
partType = detectAdditionalPartType(recipe, replacementPartItem, partType);
|
||||
|
||||
// if it's a head, we don't allow downgrading to a head with no xp, if we have xp
|
||||
if(partType == HEAD)
|
||||
if(TConstructRegistry.getMaterial(newMatId).harvestLevel == 0 && LevelingLogic.hasBoostXp(tags))
|
||||
return false;
|
||||
|
||||
// do we have enough modifiers left if we exchange this part?
|
||||
if(hasExtraModifier(oldMatId)) // paper or thaumium. sadly hardcoded.
|
||||
modifiers--;
|
||||
|
||||
Reference in new issue
Block a user