mirror of
https://github.com/GTNewHorizons/ForbiddenMagic.git
synced 2026-11-20 03:59:38 +00:00
Greedy, Educational, and Looting made incompatible
This commit is contained in:
1 parent
f8b1900b26
commit
e6742043b2
3 files changed
+4
-3
No files matched your search
@@ -241,7 +241,8 @@ public class FMEventHandler
|
||||
imprintCrystal((EntityPlayer)(event.source.getEntity()), name);
|
||||
}
|
||||
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip) > 0 && event.entityLiving instanceof EntityLiving)
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip) > 0 && event.entityLiving instanceof EntityLiving
|
||||
&& EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, equip) == 0)
|
||||
{
|
||||
int learning = 3 * ((EntityLiving)event.entityLiving).experienceValue * EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip);
|
||||
while(learning > 0)
|
||||
|
||||
@@ -30,7 +30,7 @@ public class EnchantmentEducational extends Enchantment
|
||||
*/
|
||||
public boolean canApplyTogether(Enchantment ench)
|
||||
{
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId;
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.greedy.effectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,7 @@ public class EnchantmentGreedy extends Enchantment
|
||||
*/
|
||||
public boolean canApplyTogether(Enchantment ench)
|
||||
{
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId;
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.educational.effectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user