diff --git a/common/src/main/java/org/valkyrienskies/mod/mixin/mod_compat/create_big_cannons/MixinAbstractCannonProjectile.java b/common/src/main/java/org/valkyrienskies/mod/mixin/mod_compat/create_big_cannons/MixinAbstractCannonProjectile.java deleted file mode 100644 index 96439c2b4..000000000 --- a/common/src/main/java/org/valkyrienskies/mod/mixin/mod_compat/create_big_cannons/MixinAbstractCannonProjectile.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.valkyrienskies.mod.mixin.mod_compat.create_big_cannons; - -import net.minecraft.world.entity.projectile.Projectile; -import net.minecraft.world.phys.Vec3; -import org.joml.primitives.AABBd; -import org.joml.primitives.AABBdc; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Pseudo; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.valkyrienskies.core.api.ships.Ship; -import org.valkyrienskies.mod.common.VSGameUtilsKt; -import org.valkyrienskies.mod.common.util.VectorConversionsMCKt; - -/** - * Make this pseudo so that we don't need CBC as a compile-dependency - */ -@Pseudo -@Mixin(targets = "rbasamoyai.createbigcannons.munitions.AbstractCannonProjectile") -public abstract class MixinAbstractCannonProjectile { - - @Shadow - protected abstract void clipAndDamage(Vec3 start, Vec3 end); - - @Unique - private void shipClipAndDamage(final Vec3 startInWorld, final Vec3 endInWorld, - final Projectile projectile) { - final AABBdc pathAABB = new AABBd(VectorConversionsMCKt.toJOML(startInWorld), - VectorConversionsMCKt.toJOML(endInWorld)).correctBounds(); - - for (final Ship ship : VSGameUtilsKt.getShipsIntersecting(projectile.level, pathAABB)) { - final Vec3 start = VectorConversionsMCKt.toMinecraft( - ship.getTransform().getWorldToShip().transformPosition(VectorConversionsMCKt.toJOML(startInWorld))); - final Vec3 end = VectorConversionsMCKt.toMinecraft( - ship.getTransform().getWorldToShip().transformPosition(VectorConversionsMCKt.toJOML(endInWorld))); - clipAndDamage(start, end); - } - } - - @Inject(method = "clipAndDamage", at = @At("HEAD"), remap = false) - protected void vsClipAndDamage(final Vec3 start, final Vec3 end, final CallbackInfo ci) { - shipClipAndDamage(start, end, Projectile.class.cast(this)); - } -} diff --git a/common/src/main/resources/valkyrienskies-common.mixins.json b/common/src/main/resources/valkyrienskies-common.mixins.json index bcd3bfed7..2b9bfd0d0 100644 --- a/common/src/main/resources/valkyrienskies-common.mixins.json +++ b/common/src/main/resources/valkyrienskies-common.mixins.json @@ -51,7 +51,6 @@ "feature.water_in_ships_entity.MixinEntity", "feature.world_border.MixinLevel", "feature.world_border.MixinWorldBorder", - "mod_compat.create_big_cannons.MixinAbstractCannonProjectile", "mod_compat.create_big_cannons.MixinPitchOrientedContraptionEntity", "mod_compat.ftb_chunks.MixinClaimedChunkManager", "mod_compat.sodium.MixinChunkTracker",