Advertisement
flidiii

Untitled

Mar 18th, 2025
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.05 KB | None | 0 0
  1. package com.example.mixin.client;
  2.  
  3. import net.minecraft.client.gui.DrawContext;
  4. import net.minecraft.client.gui.hud.InGameHud;
  5. import net.minecraft.entity.JumpingMount;
  6. import org.spongepowered.asm.mixin.Mixin;
  7. import org.spongepowered.asm.mixin.injection.At;
  8. import org.spongepowered.asm.mixin.injection.Inject;
  9. import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
  10.  
  11. @Mixin(InGameHud.class)
  12. public class ExampleClientMixin {
  13.  
  14.     @Inject(method = "renderHeldItemTooltip", at = @At("HEAD"), cancellable = true)
  15.     private void cancelHeldItemTooltip(CallbackInfo ci) {
  16.         ci.cancel();
  17.     }
  18.  
  19.     @Inject(method = "renderHotbarItem", at = @At("HEAD"), cancellable = true)
  20.     private void cancelHotbarItem(CallbackInfo ci) {
  21.         ci.cancel();
  22.     }
  23.  
  24.     @Inject(method = "renderHotbar", at = @At("HEAD"), cancellable = true)
  25.     private void cancelHotbar(float tickDelta, DrawContext context, CallbackInfo ci) {
  26.         ci.cancel();
  27.     }
  28.  
  29.     @Inject(method = "renderMountHealth", at = @At("HEAD"), cancellable = true)
  30.     private void cancelMountHealth(DrawContext context, CallbackInfo ci) {
  31.         ci.cancel();
  32.     }
  33.  
  34.     @Inject(method = "renderMountJumpBar", at = @At("HEAD"), cancellable = true)
  35.     private void cancelMountJumpBar(JumpingMount mount, DrawContext context, int x, CallbackInfo ci) {
  36.         ci.cancel();
  37.     }
  38.  
  39.     @Inject(method = "renderAutosaveIndicator", at = @At("HEAD"), cancellable = true)
  40.     private void cancelAutosaveIndicator(DrawContext context, CallbackInfo ci) {
  41.         ci.cancel();
  42.     }
  43.  
  44.     @Inject(method = "renderStatusBars", at = @At("HEAD"), cancellable = true)
  45.     private void cancelStatusBars(DrawContext context, CallbackInfo ci) {
  46.         ci.cancel();
  47.     }
  48.  
  49.     @Inject(method = "renderHeldItemTooltip", at = @At("HEAD"), cancellable = true)
  50.     private void cancelHeldItemTooltip(DrawContext context, CallbackInfo ci) {
  51.         ci.cancel();
  52.     }
  53.  
  54.     // 3. Отключаем отображение опыта
  55.     @Inject(method = "renderExperienceBar", at = @At("HEAD"), cancellable = true)
  56.     private void cancelExperienceBar(DrawContext context, int x, CallbackInfo ci) {
  57.         ci.cancel();
  58.     }
  59. }
  60.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement