0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-20 01:12:13 +02:00
This commit is contained in:
Alexander01998 2020-09-01 12:56:54 +02:00
parent 94e69f1111
commit a2f9d1be12

View File

@ -24,23 +24,27 @@ public class BackgroundRendererMixin
target = "Lnet/minecraft/entity/LivingEntity;hasStatusEffect(Lnet/minecraft/entity/effect/StatusEffect;)Z",
ordinal = 0),
method = "render(Lnet/minecraft/client/render/Camera;FLnet/minecraft/client/world/ClientWorld;IF)V")
private static boolean wurstHasStatusEffectRender(LivingEntity entity, StatusEffect effect)
private static boolean hasStatusEffectRender(LivingEntity entity,
StatusEffect effect)
{
if (effect == StatusEffects.BLINDNESS && WurstClient.INSTANCE.getHax().antiBlindHack.isEnabled())
if(effect == StatusEffects.BLINDNESS
&& WurstClient.INSTANCE.getHax().antiBlindHack.isEnabled())
return false;
return entity.hasStatusEffect(effect);
}
@Redirect(at = @At(value = "INVOKE",
target = "Lnet/minecraft/entity/LivingEntity;hasStatusEffect(Lnet/minecraft/entity/effect/StatusEffect;)Z",
ordinal = 1),
method = "applyFog(Lnet/minecraft/client/render/Camera;Lnet/minecraft/client/render/BackgroundRenderer$FogType;FZ)V")
private static boolean wurstHasStatusEffectApplyFog(LivingEntity entity, StatusEffect effect)
target = "Lnet/minecraft/entity/LivingEntity;hasStatusEffect(Lnet/minecraft/entity/effect/StatusEffect;)Z",
ordinal = 1),
method = "applyFog(Lnet/minecraft/client/render/Camera;Lnet/minecraft/client/render/BackgroundRenderer$FogType;FZ)V")
private static boolean hasStatusEffectApplyFog(LivingEntity entity,
StatusEffect effect)
{
if (effect == StatusEffects.BLINDNESS && WurstClient.INSTANCE.getHax().antiBlindHack.isEnabled())
if(effect == StatusEffects.BLINDNESS
&& WurstClient.INSTANCE.getHax().antiBlindHack.isEnabled())
return false;
return entity.hasStatusEffect(effect);
}
}