Snap is able with Speedster Reality Stone

This commit is contained in:
Timo Ley 2019-05-28 16:31:21 +02:00
parent 38cb1e2f12
commit cb6c59d0c7
4 changed files with 19 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package anvil.infinity.compat;
import anvil.infinity.abilities.AbilityHasRealityStone;
import lucraft.mods.lucraftcore.superpowers.abilities.Ability;
import lucraft.mods.speedsterheroes.abilities.AbilityChangeBlocks;
import lucraft.mods.speedsterheroes.abilities.AbilitySaveBlock;
@ -22,4 +23,10 @@ public class SHLoadedProxy implements SHProxy {
public Ability getAbilityTurnIntoBubbles(EntityLivingBase entity) {
return new AbilityTurnIntoBubbles(entity);
}
@Override
public boolean hasRealityStone(EntityLivingBase entity) {
return Ability.hasAbility(entity, AbilityHasRealityStone.class) || Ability.hasAbility(entity, AbilitySaveBlock.class);
}
}

View File

@ -1,5 +1,6 @@
package anvil.infinity.compat;
import anvil.infinity.abilities.AbilityHasRealityStone;
import lucraft.mods.lucraftcore.superpowers.abilities.Ability;
import net.minecraft.entity.EntityLivingBase;
@ -19,4 +20,10 @@ public class SHNotLoadedProxy implements SHProxy {
public Ability getAbilityTurnIntoBubbles(EntityLivingBase entity) {
return null;
}
@Override
public boolean hasRealityStone(EntityLivingBase entity) {
return Ability.hasAbility(entity, AbilityHasRealityStone.class);
}
}

View File

@ -11,4 +11,6 @@ public interface SHProxy {
Ability getAbilityTurnIntoBubbles(EntityLivingBase entity);
boolean hasRealityStone(EntityLivingBase entity);
}

View File

@ -16,6 +16,9 @@ public class GauntelHelper {
}
public static boolean hasRealityStone(EntityLivingBase entity) {
if (CompatHandler.isSpeedsterHeroes) {
return CompatHandler.SpeedsterHeroes.hasRealityStone(entity);
}
return Ability.hasAbility(entity, AbilityHasRealityStone.class);
}