mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47:59 +01:00
Fixed magic projectiles not triggering the destroy event on their spells when being destroyed
This commit is contained in:
parent
f3cdeaf504
commit
66bdfc0e1a
1 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,7 @@ import com.minelittlepony.unicopia.network.datasync.EffectSync;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.Entity.RemovalReason;
|
||||
import net.minecraft.entity.damage.DamageSource;
|
||||
import net.minecraft.entity.data.DataTracker;
|
||||
import net.minecraft.entity.data.TrackedData;
|
||||
|
@ -263,6 +264,12 @@ public class MagicProjectileEntity extends ThrownItemEntity implements Caster<Li
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(RemovalReason reason) {
|
||||
super.remove(reason);
|
||||
getSpellSlot().clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBlockHit(BlockHitResult hit) {
|
||||
super.onBlockHit(hit);
|
||||
|
|
Loading…
Reference in a new issue