Simplify train and rail logic and consolidate integration tests
This commit is contained in:
@@ -2,7 +2,9 @@ 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;
|
||||
@@ -10,8 +12,10 @@ 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;
|
||||
if (((EyeOfEnder) (Object) this).entityTags().contains(PayloadProjectile.NO_EYE_DROP))
|
||||
surviveAfterDeath = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user