mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-14 19:15:08 -05:00
Update MixinEntityTracker1_9
This commit is contained in:
parent
1e35249729
commit
864469aaac
1 changed files with 3 additions and 3 deletions
|
@ -27,17 +27,17 @@ import org.spongepowered.asm.mixin.injection.Slice;
|
|||
@Mixin(value = EntityTracker1_9.class, remap = false)
|
||||
public abstract class MixinEntityTracker1_9 {
|
||||
|
||||
@Redirect(method = "handleMetadata", at = @At(value = "INVOKE", target = "Ljava/lang/Math;min(FF)F"), slice = @Slice(from = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/configuration/ViaVersionConfig;isBossbarAntiflicker()Z")))
|
||||
@Redirect(method = "handleEntityData", at = @At(value = "INVOKE", target = "Ljava/lang/Math;min(FF)F"), slice = @Slice(from = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/configuration/ViaVersionConfig;isBossbarAntiflicker()Z")))
|
||||
private float removeMin(float a, float b) {
|
||||
return a;
|
||||
}
|
||||
|
||||
@Redirect(method = "handleMetadata", at = @At(value = "INVOKE", target = "Ljava/lang/Math;max(FF)F"), slice = @Slice(from = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/configuration/ViaVersionConfig;isBossbarAntiflicker()Z")))
|
||||
@Redirect(method = "handleEntityData", at = @At(value = "INVOKE", target = "Ljava/lang/Math;max(FF)F"), slice = @Slice(from = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/configuration/ViaVersionConfig;isBossbarAntiflicker()Z")))
|
||||
private float removeMax(float a, float b) {
|
||||
return b;
|
||||
}
|
||||
|
||||
@Redirect(method = "handleMetadata", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/minecraft/entitydata/EntityData;getValue()Ljava/lang/Object;"), slice = @Slice(from = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/configuration/ViaVersionConfig;isBossbarAntiflicker()Z")))
|
||||
@Redirect(method = "handleEntityData", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/minecraft/entitydata/EntityData;getValue()Ljava/lang/Object;"), slice = @Slice(from = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/configuration/ViaVersionConfig;isBossbarAntiflicker()Z")))
|
||||
private Object remapNaNToZero(EntityData instance) {
|
||||
if (instance.getValue() instanceof Float && ((Float) instance.getValue()).isNaN()) {
|
||||
return 0F;
|
||||
|
|
Loading…
Reference in a new issue