Skip to content

Commit

Permalink
restore previous behaviors;
Browse files Browse the repository at this point in the history
fix miscategorized configs;
configure dependency list of auto publish;

fix #39
  • Loading branch information
LucunJi committed Jun 24, 2024
1 parent a5c7f73 commit 75b5faa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,13 @@ private void performRendering(Entity targetEntity, double posX, double posY, dou
matrixStack1.pushMatrix();
matrixStack1.translate(0, 0, 550.0f);
matrixStack1.scale(mirror ? -1 : 1, 1, -1);
matrixStack1.rotateY((float) Math.toRadians(lightDegree));
// IDK what shit Mojang made but let's add 180 deg to restore the old behavior
matrixStack1.rotateY((float) Math.toRadians(lightDegree + 180));

RenderSystem.applyModelViewMatrix();

MatrixStack matrixStack2 = new MatrixStack();
matrixStack2.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(-(float) lightDegree));
matrixStack2.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(-(float) lightDegree - 180));
matrixStack2.translate((mirror ? -1 : 1) * posX, posY, 1000.0D);
matrixStack2.scale((float) size, (float) size, (float) size);
Quaternionf quaternion = new Quaternionf().rotateZ((float) Math.PI);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ public static boolean isConfigScreen(Screen screen) {
@Boolean
public boolean swingHands = true;
@SerialEntry
@AutoGen(category = "rotations")
@AutoGen(category = "details")
@DoubleSlider(min = -180, max = 180, step = 0.1)
public double lightDegree = 0;
@SerialEntry
@AutoGen(category = "details")
@Boolean
public boolean useWorldLight = true;
@SerialEntry
@AutoGen(category = "rotations")
@AutoGen(category = "details")
@IntSlider(min = 0, max = 15, step = 1)
public int worldLightMin = 2;
@SerialEntry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public class InGameHudMixin {

@Inject(method = "render", at = @At("RETURN"))
void onRenderFinish(DrawContext context, RenderTickCounter tickCounter, CallbackInfo ci) {
if (this.client.skipGameRender || (this.client.currentScreen != null && !Configs.isConfigScreen(client.currentScreen)))
if (this.client.skipGameRender || this.client.options.hudHidden
|| (this.client.currentScreen != null && !Configs.isConfigScreen(client.currentScreen)))
return;
playerHUDRenderer.render(client.getRenderTickCounter().getTickDelta(true));
}
Expand Down
9 changes: 8 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "explayerenderer",
"version": "3.0.0-alpha.3",
"version": "3.0.0-alpha.4",

"name": "ExtraPlayerRenderer",
"description": "Render an extra player figure on your screen. Made for game streaming and recordings.",
Expand Down Expand Up @@ -44,5 +44,12 @@
},
"suggests": {
"modmenu": "*"
},
"custom": {
"mc-publish": {
"dependencies": [
"yet_another_config_lib_v3(required){modrinth:1eAoo2KR}{curseforge:667299}#(ignore:github)"
]
}
}
}

0 comments on commit 75b5faa

Please sign in to comment.