Simplify train and rail logic and consolidate integration tests

This commit is contained in:
2026-09-13 21:55:44 +03:00
parent c39e91d836
commit 2c651a12fc
46 changed files with 2660 additions and 1233 deletions
@@ -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;
}
}