mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-23 12:05:28 +01:00
Update lithium compat
This commit is contained in:
parent
a8e0ecdbe2
commit
79f545a870
@ -27,12 +27,12 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
// Lithium is overriding the sorting with an optimized implementation
|
||||
// https://github.com/CaffeineMC/lithium-fabric/blob/develop/src/main/java/me/jellysquid/mods/lithium/mixin/entity/collisions/movement/EntityMixin.java#L54
|
||||
// https://github.com/CaffeineMC/lithium-fabric/blob/develop/src/main/java/me/jellysquid/mods/lithium/mixin/entity/collisions/movement/EntityMixin.java#L84
|
||||
@Mixin(value = Entity.class, priority = 1001 /* Lithium has to be applied first */)
|
||||
public abstract class MixinEntity {
|
||||
|
||||
@SuppressWarnings({"MixinAnnotationTarget", "UnresolvedMixinReference"})
|
||||
@Redirect(method = "lithiumCollideMultiAxisMovement", at = @At(value = "INVOKE", target = "Ljava/lang/Math;abs(D)D", ordinal = 0), remap = false)
|
||||
@Redirect(method = "lithium$CollideMovement", at = @At(value = "INVOKE", target = "Ljava/lang/Math;abs(D)D", ordinal = 0), remap = false)
|
||||
private static double alwaysSortYXZ(double a) {
|
||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_13_2)) {
|
||||
return Double.MAX_VALUE;
|
||||
|
Loading…
Reference in New Issue
Block a user