-
Notifications
You must be signed in to change notification settings - Fork 12
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
a5d8ae7
commit bf0009c
Showing
10 changed files
with
50 additions
and
70 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
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
12 changes: 3 additions & 9 deletions
12
fabric/src/main/java/com/github/dimadencep/mods/rrls/fabric/mixins/MinecraftClientMixin.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 |
---|---|---|
@@ -1,29 +1,23 @@ | ||
package com.github.dimadencep.mods.rrls.fabric.mixins; | ||
|
||
import com.github.dimadencep.mods.rrls.accessor.SplashAccessor; | ||
import com.github.dimadencep.mods.rrls.fabric.RrlsFabric; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.gui.screen.Overlay; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(MinecraftClient.class) | ||
public class MinecraftClientMixin { | ||
@Shadow | ||
public Overlay overlay; | ||
|
||
@Inject( | ||
method = "render", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lnet/minecraft/client/render/GameRenderer;render(FJZ)V", | ||
shift = At.Shift.AFTER | ||
target = "Lnet/minecraft/client/render/GameRenderer;render(FJZ)V" | ||
) | ||
) | ||
public void handleReload(boolean tick, CallbackInfo ci) { | ||
if (this.overlay instanceof SplashAccessor accessor && accessor.isAttached()) | ||
accessor.reload(); | ||
RrlsFabric.getAccessor().ifPresent(SplashAccessor::rrls$reload); | ||
} | ||
} |
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