Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.mixin.client;
- import net.minecraft.client.gui.DrawContext;
- import net.minecraft.client.gui.hud.InGameHud;
- import net.minecraft.entity.JumpingMount;
- import org.spongepowered.asm.mixin.Mixin;
- import org.spongepowered.asm.mixin.injection.At;
- import org.spongepowered.asm.mixin.injection.Inject;
- import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
- @Mixin(InGameHud.class)
- public class ExampleClientMixin {
- @Inject(method = "renderHeldItemTooltip", at = @At("HEAD"), cancellable = true)
- private void cancelHeldItemTooltip(CallbackInfo ci) {
- ci.cancel();
- }
- @Inject(method = "renderHotbarItem", at = @At("HEAD"), cancellable = true)
- private void cancelHotbarItem(CallbackInfo ci) {
- ci.cancel();
- }
- @Inject(method = "renderHotbar", at = @At("HEAD"), cancellable = true)
- private void cancelHotbar(float tickDelta, DrawContext context, CallbackInfo ci) {
- ci.cancel();
- }
- @Inject(method = "renderMountHealth", at = @At("HEAD"), cancellable = true)
- private void cancelMountHealth(DrawContext context, CallbackInfo ci) {
- ci.cancel();
- }
- @Inject(method = "renderMountJumpBar", at = @At("HEAD"), cancellable = true)
- private void cancelMountJumpBar(JumpingMount mount, DrawContext context, int x, CallbackInfo ci) {
- ci.cancel();
- }
- @Inject(method = "renderAutosaveIndicator", at = @At("HEAD"), cancellable = true)
- private void cancelAutosaveIndicator(DrawContext context, CallbackInfo ci) {
- ci.cancel();
- }
- @Inject(method = "renderStatusBars", at = @At("HEAD"), cancellable = true)
- private void cancelStatusBars(DrawContext context, CallbackInfo ci) {
- ci.cancel();
- }
- @Inject(method = "renderHeldItemTooltip", at = @At("HEAD"), cancellable = true)
- private void cancelHeldItemTooltip(DrawContext context, CallbackInfo ci) {
- ci.cancel();
- }
- // 3. Отключаем отображение опыта
- @Inject(method = "renderExperienceBar", at = @At("HEAD"), cancellable = true)
- private void cancelExperienceBar(DrawContext context, int x, CallbackInfo ci) {
- ci.cancel();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement