Require line-of-sight for summoning spells

This commit is contained in:
Electroblob77
2020-05-12 23:28:05 +01:00
parent bfc23ce6f7
commit 25475632d9
2 changed files with 44 additions and 4 deletions
@@ -37,7 +37,7 @@ public class Decay extends SpellConstructRanged<EntityDecay> {
int verticalRange = (int)(6 * modifiers.get(WizardryItems.blast_upgrade));
for(int i=0; i<quantity; i++){
BlockPos pos = WizardryUtilities.findNearbyFloorSpace(world, origin, horizontalRange, verticalRange);
BlockPos pos = WizardryUtilities.findNearbyFloorSpace(world, origin, horizontalRange, verticalRange, false);
if(pos == null) break;
super.spawnConstruct(world, pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5, side, caster, modifiers);
}