Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit dec95df

Browse files
committed
changed rotation speed of cogwheels in EditFeaturesScreen
1 parent 70e904c commit dec95df

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

simpleclient-1.19.4/src/main/java/simpleclient/gui/EditFeaturesScreen.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33
import com.mojang.blaze3d.systems.RenderSystem;
44
import com.mojang.blaze3d.vertex.PoseStack;
55
import com.mojang.math.Axis;
6-
import net.minecraft.client.gui.Gui;
76
import net.minecraft.client.gui.GuiComponent;
87
import net.minecraft.client.gui.screens.Screen;
98
import net.minecraft.client.renderer.GameRenderer;
109
import net.minecraft.network.chat.Component;
1110
import net.minecraft.resources.ResourceLocation;
12-
import org.joml.AxisAngle4d;
13-
import org.joml.AxisAngle4f;
14-
import org.joml.Quaternionf;
1511
import simpleclient.adapter.ItemRendererAdapter;
1612
import simpleclient.adapter.ItemRendererAdapterImpl;
1713
import simpleclient.adapter.TextRendererAdapter;
@@ -20,7 +16,6 @@
2016
import simpleclient.text.Text;
2117
import simpleclient.util.DrawUtil;
2218

23-
import java.io.IOException;
2419
import java.util.List;
2520

2621
public class EditFeaturesScreen extends Screen {
@@ -91,7 +86,7 @@ public void render(PoseStack poseStack, int mouseX, int mouseY, float delta) {
9186
int cogwheelY = scroll + wY2 - wSize / 10 - wSize / 3 / 2;
9287
if (cogwheelX <= mouseX && mouseX <= cogwheelX + h &&
9388
cogwheelY <= mouseY && mouseY <= cogwheelY + h) {
94-
float degrees = 360.0F / 400 * ((float) (System.currentTimeMillis() % 4000) / 10);
89+
float degrees = 360.0F / 300 * ((float) (System.currentTimeMillis() % 3000) / 10);
9590
poseStack.rotateAround(Axis.ZP.rotationDegrees(degrees), cogwheelX + h / 2, cogwheelY + h / 2, 0.0F);
9691
}
9792
RenderSystem.setShader(GameRenderer::getPositionTexShader);

simpleclient-1.20.1/src/main/java/simpleclient/gui/EditFeaturesScreen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta)
8080
int cogwheelY = scroll + wY2 - wSize / 10 - wSize / 3 / 2;
8181
if (cogwheelX <= mouseX && mouseX <= cogwheelX + h &&
8282
cogwheelY <= mouseY && mouseY <= cogwheelY + h) {
83-
float degrees = 360.0F / 400 * ((float) (System.currentTimeMillis() % 4000) / 10);
84-
guiGraphics.pose().rotateAround(Axis.ZP.rotation(degrees), cogwheelX + h / 2, cogwheelY + h / 2, 0.0F);
83+
float degrees = 360.0F / 300 * ((float) (System.currentTimeMillis() % 3000) / 10);
84+
guiGraphics.pose().rotateAround(Axis.ZP.rotationDegrees(degrees), cogwheelX + h / 2, cogwheelY + h / 2, 0.0F);
8585
}
8686
guiGraphics.blit(new ResourceLocation("simpleclient", "textures/settings.png"), cogwheelX, cogwheelY, 0,
8787
0, h, h, h, h);

simpleclient-1.20/src/main/java/simpleclient/gui/EditFeaturesScreen.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
package simpleclient.gui;
22

3-
import com.mojang.blaze3d.systems.RenderSystem;
4-
import com.mojang.blaze3d.vertex.PoseStack;
53
import com.mojang.math.Axis;
64
import net.minecraft.client.gui.GuiGraphics;
75
import net.minecraft.client.gui.screens.Screen;
8-
import net.minecraft.client.renderer.GameRenderer;
96
import net.minecraft.network.chat.Component;
107
import net.minecraft.resources.ResourceLocation;
118
import simpleclient.adapter.ItemRendererAdapter;
@@ -86,8 +83,8 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta)
8683
int cogwheelY = scroll + wY2 - wSize / 10 - wSize / 3 / 2;
8784
if (cogwheelX <= mouseX && mouseX <= cogwheelX + h &&
8885
cogwheelY <= mouseY && mouseY <= cogwheelY + h) {
89-
float degrees = 360.0F / 400 * ((float) (System.currentTimeMillis() % 4000) / 10);
90-
guiGraphics.pose().rotateAround(Axis.ZP.rotation(degrees), cogwheelX + h / 2, cogwheelY + h / 2, 0.0F);
86+
float degrees = 360.0F / 300 * ((float) (System.currentTimeMillis() % 3000) / 10);
87+
guiGraphics.pose().rotateAround(Axis.ZP.rotationDegrees(degrees), cogwheelX + h / 2, cogwheelY + h / 2, 0.0F);
9188
}
9289
guiGraphics.blit(new ResourceLocation("simpleclient", "textures/settings.png"), cogwheelX, cogwheelY, 0, 0, h, h, h, h);
9390
guiGraphics.pose().popPose();

simpleclient-1.8.9/src/main/java/simpleclient/gui/EditFeaturesScreen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void render(int mouseX, int mouseY, float delta) {
7777
float height = wSize / 6;
7878
float cogwheelX = wX2 - wSize / 10 - height;
7979
float cogwheelY = scroll + wY2 - wSize / 10 - height;
80-
float degrees = 360.0F / 400 * ((float) (System.currentTimeMillis() % 4000) / 10);
80+
float degrees = 360.0F / 300 * ((float) (System.currentTimeMillis() % 3000) / 10);
8181
GlStateManager.translate(cogwheelX + height / 2, cogwheelY + height / 2, 0);
8282
// Rotate
8383
GlStateManager.pushMatrix();

0 commit comments

Comments
 (0)