-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to 1.20.1, fix config screen reset
- Loading branch information
Showing
18 changed files
with
197 additions
and
160 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
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
41 changes: 0 additions & 41 deletions
41
Shared/src/main/java/dev/tr7zw/exordium/mixin/DebugScreenOverlayMixin.java
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
Shared/src/main/java/dev/tr7zw/exordium/mixin/GuiDebugOverlayMixin.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,40 @@ | ||
package dev.tr7zw.exordium.mixin; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
|
||
import dev.tr7zw.exordium.ExordiumModBase; | ||
import dev.tr7zw.exordium.util.BufferedComponent; | ||
import net.minecraft.client.gui.Gui; | ||
import net.minecraft.client.gui.GuiGraphics; | ||
import net.minecraft.client.gui.components.DebugScreenOverlay; | ||
|
||
@Mixin(Gui.class) | ||
public class GuiDebugOverlayMixin { | ||
|
||
private BufferedComponent debugBufferedComponent = new BufferedComponent(true, ExordiumModBase.instance.config.debugScreenSettings) { | ||
|
||
@Override | ||
public boolean needsRender() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void captureState() { | ||
} | ||
}; | ||
|
||
@WrapOperation(method = "render", at = { | ||
@At(value = "INVOKE", target = "Lnet/minecraft/client/gui/components/DebugScreenOverlay;render(Lnet/minecraft/client/gui/GuiGraphics;)V"), | ||
}) | ||
private void renderExperienceBarWrapper(DebugScreenOverlay overlay, GuiGraphics guiGraphics, final Operation<Void> operation) { | ||
if (!debugBufferedComponent.render()) { | ||
operation.call(overlay, guiGraphics); | ||
} | ||
debugBufferedComponent.renderEnd(); | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.