Skip to content

Commit afcbae0

Browse files
committed
Added back in the SplashProgress
1 parent bc9172b commit afcbae0

File tree

6 files changed

+689
-3
lines changed

6 files changed

+689
-3
lines changed

src/main/java/llc/redstone/hysentials/guis/hsplayerlist/GuiOnlineList.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,13 @@ public void renderPlayerlist(int width) {
9696
int s;
9797
//draw hsob
9898
drawRect(width / 2 - r / 2 - 1, 0, width / 2 + r / 2 + 1, (int) ((r/2.688172043) + 10), Integer.MIN_VALUE);
99+
GlStateManager.pushAttrib();
99100
this.mc.getTextureManager().bindTexture(hsob);
100-
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
101101
GlStateManager.enableAlpha();
102102
GlStateManager.enableBlend();
103-
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
104103
drawModalRectWithCustomSizedTexture(width / 2 - (r + 10) / 2, 0, 0, 0, r + 10, (int) ((r/2.688172043) + 10), r + 10, r/3f + 10);
104+
GlStateManager.popAttrib();
105105
q += (int) (r/2.688172043);
106-
this.mc.getTextureManager().bindTexture(GuiIngame.icons);
107106

108107

109108
drawRect(width / 2 - r / 2 - 1, q - 1, width / 2 + r / 2 + 1, q + m * 9, Integer.MIN_VALUE);
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package llc.redstone.hysentials.mixin;
2+
3+
import llc.redstone.hysentials.util.SplashProgress;
4+
import net.minecraft.client.Minecraft;
5+
import net.minecraft.client.resources.IReloadableResourceManager;
6+
import net.minecraftforge.fml.client.FMLClientHandler;
7+
import org.spongepowered.asm.mixin.Mixin;
8+
import org.spongepowered.asm.mixin.injection.At;
9+
import org.spongepowered.asm.mixin.injection.Inject;
10+
import org.spongepowered.asm.mixin.injection.Redirect;
11+
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
12+
13+
import java.util.List;
14+
import java.util.concurrent.Semaphore;
15+
16+
@Mixin(value=FMLClientHandler.class, remap = false)
17+
public class FMLClientHandlerMixin {
18+
@Redirect(method = "beginMinecraftLoading", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/client/SplashProgress;start()V"))
19+
private void rdStart() {
20+
SplashProgress.start();
21+
}
22+
23+
@Redirect(method = "onInitializationComplete", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/client/SplashProgress;finish()V"))
24+
private void rdFinish3() {
25+
SplashProgress.finish();
26+
}
27+
28+
@Redirect(method = "haltGame", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/client/SplashProgress;finish()V"))
29+
private void rdFinish() {
30+
SplashProgress.finish();
31+
}
32+
33+
@Redirect(method = "finishMinecraftLoading", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/client/SplashProgress;finish()V"))
34+
private void rdFinish2() {
35+
SplashProgress.finish();
36+
}
37+
38+
@Redirect(method = "processWindowMessages", at = @At(value = "INVOKE", target = "Ljava/util/concurrent/Semaphore;tryAcquire()Z"))
39+
private boolean rdTryAcquire(Semaphore instance) {
40+
return SplashProgress.mutex.tryAcquire();
41+
}
42+
43+
@Redirect(method = "processWindowMessages", at = @At(value = "INVOKE", target = "Ljava/util/concurrent/Semaphore;release()V"))
44+
private void rdRelease(Semaphore instance) {
45+
SplashProgress.mutex.release();
46+
}
47+
}

0 commit comments

Comments
 (0)