mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-12 16:14:24 +01:00
Fixed the helper gem's ai
This commit is contained in:
parent
4151721ce7
commit
8cff3f3676
1 changed files with 10 additions and 13 deletions
|
@ -67,20 +67,17 @@ public class SpellDrake extends AbstractSpell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!source.getWorld().isRemote) {
|
if (piggyBackSpell == null) {
|
||||||
|
AxisAlignedBB bb = EFFECT_BOUNDS.offset(source.getOriginVector());
|
||||||
|
|
||||||
if (piggyBackSpell == null) {
|
source.getWorld().getEntitiesInAABBexcluding(source.getEntity(), bb, e -> e instanceof EntitySpell).stream()
|
||||||
AxisAlignedBB bb = EFFECT_BOUNDS.offset(source.getOriginVector());
|
.map(i -> (EntitySpell)i)
|
||||||
|
.filter(i -> i.hasEffect() && !(i.getEffect() instanceof SpellDrake))
|
||||||
source.getWorld().getEntitiesInAABBexcluding(source.getEntity(), bb, e -> e instanceof EntitySpell).stream()
|
.findFirst().ifPresent(i -> {
|
||||||
.map(i -> (EntitySpell)i)
|
piggyBackSpell = i.getEffect().copy();
|
||||||
.filter(i -> i.hasEffect() && !(i.getEffect() instanceof SpellDrake))
|
piggyBackSpell.onPlaced(source);
|
||||||
.findFirst().ifPresent(i -> {
|
i.setEffect(null);
|
||||||
piggyBackSpell = i.getEffect().copy();
|
});
|
||||||
piggyBackSpell.onPlaced(source);
|
|
||||||
i.setEffect(null);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (piggyBackSpell != null) {
|
if (piggyBackSpell != null) {
|
||||||
|
|
Loading…
Reference in a new issue