Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Mixin(LivingEntity.class)
- public abstract class LivingEntityMixin{
- @Shadow public abstract boolean hasStatusEffect(StatusEffect effect);
- @Shadow public abstract StatusEffectInstance getStatusEffect(StatusEffect effect);
- }
- @Mixin(ClientPlayerEntity.class)
- public abstract class ClientPlayerEntityMixin extends LivingEntityMixin{
- @Inject(method = "updateNausea()V", at = @At(value = "TAIL"))
- private void injection(CallbackInfo ci){
- if (this.hasStatusEffect(StatusEffects.NAUSEA) && this.getStatusEffect(StatusEffects.NAUSEA).getDuration() > 60) {
- // do something
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement