Fallen Kanade fixes.

This commit is contained in:
Vasco Lavos committed 2014-07-13 02:16:13 +01:00
1 parent 247522fc68
commit a553124768
1 file changed
+7 -5
@@ -30,11 +30,13 @@ public class SubTileFallenKanade extends SubTileFunctional {
final int range = 2;
final int cost = 120;
List<EntityPlayer> players = supertile.getWorldObj().getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - range, supertile.zCoord - range, supertile.xCoord + range + 1, supertile.yCoord + range + 1, supertile.zCoord + range + 1));
for(EntityPlayer player : players) {
if(player.getActivePotionEffect(Potion.regeneration) == null && mana >= cost) {
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 60, 2));
mana -= cost;
if(!supertile.getWorldObj().isRemote) {
List<EntityPlayer> players = supertile.getWorldObj().getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - range, supertile.zCoord - range, supertile.xCoord + range + 1, supertile.yCoord + range + 1, supertile.zCoord + range + 1));
for(EntityPlayer player : players) {
if(player.getActivePotionEffect(Potion.regeneration) == null && mana >= cost) {
player.addPotionEffect(new PotionEffect(Potion.regeneration.id, 60, 2));
mana -= cost;
}
}
}
}