forked from Caedis/DuraDisplay
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from GTNewHorizons/dev
Fix more types of items
- Loading branch information
Showing
6 changed files
with
81 additions
and
16 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
26 changes: 26 additions & 0 deletions
26
src/main/java/com/caedis/duradisplay/mixins/minecraft/MixinGuiScreen.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,26 @@ | ||
package com.caedis.duradisplay.mixins.minecraft; | ||
|
||
import net.minecraft.client.gui.GuiScreen; | ||
|
||
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; | ||
|
||
import com.caedis.duradisplay.render.DurabilityRenderer; | ||
|
||
@Mixin(value = GuiScreen.class) | ||
public class MixinGuiScreen { | ||
|
||
@SuppressWarnings("UnresolvedMixinReference") | ||
@Inject(method = "drawScreen(IIF)V", at = @At("HEAD")) | ||
private void drawScreenStart(CallbackInfo cbi) { | ||
DurabilityRenderer.ShouldRun = false; | ||
} | ||
|
||
@SuppressWarnings("UnresolvedMixinReference") | ||
@Inject(method = "drawScreen(IIF)V", at = @At("RETURN")) | ||
private void drawScreenEnd(CallbackInfo cbi) { | ||
DurabilityRenderer.ShouldRun = true; | ||
} | ||
} |
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
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