This commit is contained in:
Electroblob
2018-02-26 18:37:52 +00:00
parent 13444f1de3
commit 6f776fbae6
8 changed files with 15 additions and 17 deletions
@@ -116,9 +116,9 @@ public class MindTrick extends Spell {
if(event.getSource() != null && event.getSource().getTrueSource() instanceof EntityLivingBase){
// Cancels the mind trick effect if the creature takes damage
// This has been moved to within an (event.getSource().getEntity() instanceof EntityLivingBase) check so it
// doesn't
// crash the game with a ConcurrentModificationException. If you think about it, mind trick only ought to be
// cancelled if something attacks the entity since potions, drowning, cacti etc. don't affect the targeting.
// doesn't crash the game with a ConcurrentModificationException. If you think about it, mind trick only
// ought to be cancelled if something attacks the entity since potions, drowning, cacti etc. don't affect the
// targeting.
if(event.getEntityLiving().isPotionActive(WizardryPotions.mind_trick)){
event.getEntityLiving().removePotionEffect(WizardryPotions.mind_trick);
}
@@ -119,8 +119,7 @@ public class Petrify extends Spell {
}
}
caster.swingArm(hand);
WizardryUtilities.playSoundAtPlayer(caster, SoundEvents.ENTITY_WITHER_SPAWN, 1.0F,
world.rand.nextFloat() * 0.2F + 1.0F);
WizardryUtilities.playSoundAtPlayer(caster, SoundEvents.ENTITY_WITHER_SPAWN, 1.0F, world.rand.nextFloat() * 0.2F + 1.0F);
return true;
}
@@ -36,9 +36,7 @@ public class PhaseStep extends Spell {
// The maximum wall thickness as determined by the range multiplier. The + 0.5f is so that
// weird float processing doesn't incorrectly round it down.
int maxThickness = 1
+ (int)((modifiers.get(WizardryItems.range_upgrade) - 1) / Constants.RANGE_INCREASE_PER_LEVEL
+ 0.5f);
int maxThickness = 1 + (int)((modifiers.get(WizardryItems.range_upgrade) - 1) / Constants.RANGE_INCREASE_PER_LEVEL + 0.5f);
if(rayTrace.sideHit.getAxis().isHorizontal()){
@@ -49,8 +47,7 @@ public class PhaseStep extends Spell {
// Prevents the player from teleporting through unbreakable blocks, so they cannot cheat in other
// mods' mazes and dungeons.
if((WizardryUtilities.isBlockUnbreakable(world, pos1)
|| WizardryUtilities.isBlockUnbreakable(world, pos1.up()))
if((WizardryUtilities.isBlockUnbreakable(world, pos1) || WizardryUtilities.isBlockUnbreakable(world, pos1.up()))
&& !Wizardry.settings.teleportThroughUnbreakableBlocks)
return false;