fix(devutil): prevent improper model reload
This commit is contained in:
parent
c967a36eaa
commit
70647e1710
|
@ -1,27 +0,0 @@
|
|||
package io.gitlab.jfronny.libjf.devutil.mixin;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.client.gui.screen.SplashOverlay;
|
||||
import net.minecraft.resource.ResourceReload;
|
||||
import org.spongepowered.asm.mixin.*;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(SplashOverlay.class)
|
||||
public class SplashOverlayMixin {
|
||||
@Shadow @Final private ResourceReload reload;
|
||||
|
||||
/**
|
||||
* Taken from mod-fungible
|
||||
* @author magistermaks
|
||||
*/
|
||||
@Inject(method="render", at=@At("HEAD"), cancellable=true)
|
||||
public void render(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo info) {
|
||||
if (reload.isComplete()) {
|
||||
MinecraftClient.getInstance().setOverlay(null);
|
||||
info.cancel();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@
|
|||
"client": [
|
||||
"MinecraftClientMixin",
|
||||
"ProfileKeysMixin",
|
||||
"SplashOverlayMixin",
|
||||
"TitleScreenMixin"
|
||||
],
|
||||
"injectors": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user