Add server-only crossbow ammunition and copper rail speed controls
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user