generated from neoforged/MDK
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34d37ea
commit 4837177
Showing
4 changed files
with
33 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/com/leclowndu93150/duradisplay/mixins/GuiGraphicsMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.leclowndu93150.duradisplay.mixins; | ||
|
||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue; | ||
import net.minecraft.client.gui.Font; | ||
import net.minecraft.client.renderer.entity.ItemRenderer; | ||
import net.minecraft.world.item.ItemStack; | ||
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(value = ItemRenderer.class) | ||
public abstract class GuiGraphicsMixin { | ||
@ModifyExpressionValue( | ||
method = "Lnet/minecraft/client/renderer/entity/ItemRenderer;renderGuiItemDecorations(Lnet/minecraft/client/gui/Font;Lnet/minecraft/world/item/ItemStack;IILjava/lang/String;)V", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lnet/minecraft/world/item/ItemStack;isBarVisible()Z" | ||
) | ||
|
||
) | ||
private boolean disableBarInGui(boolean barVisible) { | ||
return false; | ||
} | ||
|
||
@Inject( | ||
method = "Lnet/minecraft/client/renderer/entity/ItemRenderer;renderGuiItemDecorations(Lnet/minecraft/client/gui/Font;Lnet/minecraft/world/item/ItemStack;IILjava/lang/String;)V", | ||
at = @At("TAIL") | ||
) | ||
public void renderItemDecoration(Font p_115175_, ItemStack p_115176_, int p_115177_, int p_115178_, String p_115179_, CallbackInfo ci){ | ||
System.out.println("I work"); | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
src/main/java/com/leclowndu93150/duradisplay/mixins/GuiGraphicsMixin.java.disabled
This file was deleted.
Oops, something went wrong.