18 lines
704 B
Java
18 lines
704 B
Java
package online.astradev.content.mixin;
|
|||
|
|
|
||
|
|
import net.minecraft.world.entity.projectile.EyeOfEnder;
|
||
|
|
import net.minecraft.world.phys.Vec3;
|
||
|
|
import online.astradev.content.weapon.PayloadProjectile;
|
||
|
|
import org.spongepowered.asm.mixin.*;
|
||
|
|
import org.spongepowered.asm.mixin.injection.*;
|
||
|
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||
|
|
|
||
|
|
@Mixin(EyeOfEnder.class)
|
||
|
|
public abstract class PayloadMixin {
|
||
|
|
@Shadow private boolean surviveAfterDeath;
|
||
|
|
@Inject(method = "signalTo", at = @At("RETURN"))
|
||
|
|
private void astra$noDuplicate(Vec3 target, CallbackInfo ci) {
|
||
|
|
if (((EyeOfEnder)(Object)this).entityTags().contains(PayloadProjectile.NO_EYE_DROP)) surviveAfterDeath = false;
|
||
|
|
}
|
||
|
|
}
|