mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-08 06:26:43 +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) {
|
||||
AxisAlignedBB bb = EFFECT_BOUNDS.offset(source.getOriginVector());
|
||||
|
||||
source.getWorld().getEntitiesInAABBexcluding(source.getEntity(), bb, e -> e instanceof EntitySpell).stream()
|
||||
.map(i -> (EntitySpell)i)
|
||||
.filter(i -> i.hasEffect() && !(i.getEffect() instanceof SpellDrake))
|
||||
.findFirst().ifPresent(i -> {
|
||||
piggyBackSpell = i.getEffect().copy();
|
||||
piggyBackSpell.onPlaced(source);
|
||||
i.setEffect(null);
|
||||
});
|
||||
}
|
||||
source.getWorld().getEntitiesInAABBexcluding(source.getEntity(), bb, e -> e instanceof EntitySpell).stream()
|
||||
.map(i -> (EntitySpell)i)
|
||||
.filter(i -> i.hasEffect() && !(i.getEffect() instanceof SpellDrake))
|
||||
.findFirst().ifPresent(i -> {
|
||||
piggyBackSpell = i.getEffect().copy();
|
||||
piggyBackSpell.onPlaced(source);
|
||||
i.setEffect(null);
|
||||
});
|
||||
}
|
||||
|
||||
if (piggyBackSpell != null) {
|
||||
|
|
Loading…
Reference in a new issue