From 3ab44c5ff511caeb6d5529c7bacca678496ded0c Mon Sep 17 00:00:00 2001 From: Skywalkervalle <64580908+Skywalkervalle@users.noreply.github.com> Date: Sat, 1 Aug 2026 16:44:19 +0200 Subject: [PATCH 1/2] Small Animation Rework - Rework BASIC_ANIMATION_SPEED -> animated signals are now a littel bit slower and realistic - fix Vr2 Animation sema - realistic animationSpeed: shmech, sema_dist, switchhandle --- .../animation/SignalAnimationHandler.java | 2 +- .../animations/semaphoresignal.json | 28 +++++++-- .../assets/opensignals/animations/shmech.json | 12 ++-- .../opensignals/animations/switchhandle.json | 57 +++++++++++-------- .../modeldefinitions/semaphoresignal.json | 3 +- 5 files changed, 64 insertions(+), 38 deletions(-) diff --git a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java index 0a2902bcc..76e29d5d2 100644 --- a/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java +++ b/src/main/java/com/troblecodings/signals/animation/SignalAnimationHandler.java @@ -45,7 +45,7 @@ public class SignalAnimationHandler { private int animationsRunning = 0; private long lastWorldTick = -1; - public static final float BASIC_ANIMATION_SPEED = 0.001f; + public static final float BASIC_ANIMATION_SPEED = 0.00055f; public SignalAnimationHandler(final SignalTileEntity tile) { this.tile = tile; diff --git a/src/main/resources/assets/opensignals/animations/semaphoresignal.json b/src/main/resources/assets/opensignals/animations/semaphoresignal.json index 59941396c..37497e64f 100644 --- a/src/main/resources/assets/opensignals/animations/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/animations/semaphoresignal.json @@ -195,6 +195,7 @@ { "predicate": "with(SEMATYPE.DIST) && !with(SEMAVR.VR1)", "mode": "ROTATION", + "animationSpeed": 1.25, "rotationAxis": "X", "rotation": 0 }, @@ -202,6 +203,7 @@ "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR1)", "mode": "ROTATION", "rotationAxis": "X", + "animationSpeed": 1.25, "rotation": 90 } ] @@ -217,6 +219,7 @@ { "predicate": "with(SEMATYPE.DIST) && !with(SEMAVR.VR2)", "mode": "ROTATION", + "animationSpeed": 1, "rotationAxis": "Z", "rotation": 0 }, @@ -224,6 +227,7 @@ "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR2)", "mode": "ROTATION", "rotationAxis": "Z", + "animationSpeed": 1, "rotation": -45 } ] @@ -234,16 +238,22 @@ "translationZ": 0, "animationConfigs": [ { - "predicate": "with(SEMATYPE.DIST) && (with(SEMAVR.VR0) || with(SEMAVR.VR2))", + "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR0)", "mode": "TRANSLATION", - "animationSpeed": 0.25, + "animationSpeed": 0.75, "destY": 0 }, { "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR1)", "mode": "TRANSLATION", - "animationSpeed": 0.25, + "animationSpeed": 0.75, "destY": -0.25 + }, + { + "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR2)", + "mode": "TRANSLATION", + "animationSpeed": 0.75, + "destY": 0 } ] }, @@ -255,13 +265,19 @@ { "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR0)", "mode": "TRANSLATION", - "animationSpeed": 0.25, + "animationSpeed": 0.75, "destY": 0 }, { - "predicate": "with(SEMATYPE.DIST) && (with(SEMAVR.VR1) || with(SEMAVR.VR2))", + "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR1)", + "mode": "TRANSLATION", + "animationSpeed": 0.75, + "destY": 0.25 + }, + { + "predicate": "with(SEMATYPE.DIST) && with(SEMAVR.VR2)", "mode": "TRANSLATION", - "animationSpeed": 0.25, + "animationSpeed": 0.75, "destY": 0.25 } ] diff --git a/src/main/resources/assets/opensignals/animations/shmech.json b/src/main/resources/assets/opensignals/animations/shmech.json index 98ca2ddeb..fe12cfa75 100644 --- a/src/main/resources/assets/opensignals/animations/shmech.json +++ b/src/main/resources/assets/opensignals/animations/shmech.json @@ -12,13 +12,13 @@ "predicate": "with(SH_MECH.SH0) && hasandisnot(sh_high)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 1, "rotation": 0 }, { "predicate": "with(SH_MECH.SH1) && hasandisnot(sh_high)", "mode": "ROTATION", - "animationSpeed": 2, + "animationSpeed": 1, "rotationAxis": "Z", "rotation": -45 }, @@ -26,7 +26,7 @@ "predicate": "with(SH_MECH.SH1_GSP2) && hasandisnot(sh_high)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 1, "rotation": -90 } ] @@ -43,21 +43,21 @@ "predicate": "with(SH_MECH.SH0) && hasandis(sh_high)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 1, "rotation": 0 }, { "predicate": "with(SH_MECH.SH1) && hasandis(sh_high)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 1, "rotation": -45 }, { "predicate": "with(SH_MECH.SH1_GSP2) && hasandis(sh_high)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 1, "rotation": -90 } ] diff --git a/src/main/resources/assets/opensignals/animations/switchhandle.json b/src/main/resources/assets/opensignals/animations/switchhandle.json index f93554952..e99d3811d 100644 --- a/src/main/resources/assets/opensignals/animations/switchhandle.json +++ b/src/main/resources/assets/opensignals/animations/switchhandle.json @@ -12,26 +12,29 @@ "predicate": "with(WN_MECH.WN1) && hasandisnot(SWITCHSIDE) && hasandisnot(FALLBACK_SWITCH) && hasandisnot(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", + "animationSpeed": 1.5, "rotation": 0 + }, { "predicate": "with(WN_MECH.WN2) && hasandisnot(SWITCHSIDE) && hasandisnot(FALLBACK_SWITCH) && hasandisnot(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", + "animationSpeed": 1.5, "rotation": -90 }, { "predicate": "(with(WN_MECH.WN1) || hasandisnot(POWERED)) && hasandisnot(SWITCHSIDE) && hasandisnot(FALLBACK_SWITCH) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "(with(WN_MECH.WN2) || hasandis(POWERED)) && hasandisnot(SWITCHSIDE) && hasandisnot(FALLBACK_SWITCH) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": -90 } ] @@ -48,26 +51,28 @@ "predicate": "with(WN_MECH.WN1) && hasandis(SWITCHSIDE) && hasandisnot(FALLBACK_SWITCH) && hasandisnot(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", + "animationSpeed": 1.5, "rotation": 0 }, { "predicate": "with(WN_MECH.WN2) && hasandis(SWITCHSIDE) && hasandisnot(FALLBACK_SWITCH) && hasandisnot(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", + "animationSpeed": 1.5, "rotation": -90 }, { "predicate": "(with(WN_MECH.WN1) || hasandisnot(POWERED)) && hasandis(SWITCHSIDE) && hasandisnot(FALLBACK_SWITCH) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "(with(WN_MECH.WN2) || hasandis(POWERED)) && hasandis(SWITCHSIDE) && hasandisnot(FALLBACK_SWITCH) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": -90 } ] @@ -84,26 +89,28 @@ "predicate": "with(WN_MECH.WN1) && hasandisnot(SWITCHSIDE) && hasandis(FALLBACK_SWITCH) && hasandisnot(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", + "animationSpeed": 1.5, "rotation": 0 }, { "predicate": "with(WN_MECH.WN2) && hasandisnot(SWITCHSIDE) && hasandis(FALLBACK_SWITCH) && hasandisnot(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", + "animationSpeed": 1.5, "rotation": -90 }, { "predicate": "(with(WN_MECH.WN1) || hasandisnot(POWERED)) && hasandisnot(SWITCHSIDE) && hasandis(FALLBACK_SWITCH) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "(with(WN_MECH.WN2) || hasandis(POWERED)) && hasandisnot(SWITCHSIDE) && hasandis(FALLBACK_SWITCH) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": -90 } ] @@ -120,26 +127,28 @@ "predicate": "with(WN_MECH.WN1) && hasandis(SWITCHSIDE) && hasandis(FALLBACK_SWITCH) && hasandisnot(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", + "animationSpeed": 1.5, "rotation": 0 }, { "predicate": "with(WN_MECH.WN2) && hasandis(SWITCHSIDE) && hasandis(FALLBACK_SWITCH) && hasandisnot(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", + "animationSpeed": 1.5, "rotation": -90 }, { "predicate": "(with(WN_MECH.WN1) || hasandisnot(POWERED)) && hasandis(SWITCHSIDE) && hasandis(FALLBACK_SWITCH) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "(with(WN_MECH.WN2) || hasandis(POWERED)) && hasandis(SWITCHSIDE) && hasandis(FALLBACK_SWITCH) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Y", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": -90 } ] @@ -156,14 +165,14 @@ "predicate": "hasandisnot(POWERED) && with(WEIGHTCOLOR.WHITE_BLACK) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "hasandis(POWERED) && with(WEIGHTCOLOR.WHITE_BLACK) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 90 } ] @@ -180,14 +189,14 @@ "predicate": "hasandisnot(POWERED) && with(WEIGHTCOLOR.WHITE_BLACK_W) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "hasandis(POWERED) && with(WEIGHTCOLOR.WHITE_BLACK_W) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 90 } ] @@ -204,14 +213,14 @@ "predicate": "hasandisnot(POWERED) && with(WEIGHTCOLOR.YELLOW_BLACK) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "hasandis(POWERED) && with(WEIGHTCOLOR.YELLOW_BLACK) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 90 } ] @@ -228,14 +237,14 @@ "predicate": "hasandisnot(POWERED) && with(WEIGHTCOLOR.RED_YELLOW) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "hasandis(POWERED) && with(WEIGHTCOLOR.RED_YELLOW) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 90 } ] @@ -252,14 +261,14 @@ "predicate": "hasandisnot(POWERED) && with(WEIGHTCOLOR.YELLOW) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "hasandis(POWERED) && with(WEIGHTCOLOR.YELLOW) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 90 } ] @@ -276,14 +285,14 @@ "predicate": "hasandis(POWERED) && with(WEIGHTCOLOR.BLACK_WHITE) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "hasandisnot(POWERED) && with(WEIGHTCOLOR.BLACK_WHITE) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": -90 } ] @@ -300,14 +309,14 @@ "predicate": "hasandis(POWERED) && with(WEIGHTCOLOR.BLACK_WHITE_W) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "hasandisnot(POWERED) && with(WEIGHTCOLOR.BLACK_WHITE_W) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": -90 } ] @@ -324,14 +333,14 @@ "predicate": "hasandis(POWERED) && with(WEIGHTCOLOR.BLACK_YELLOW) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": 0 }, { "predicate": "hasandisnot(POWERED) && with(WEIGHTCOLOR.BLACK_YELLOW) && hasandis(MANUAL)", "mode": "ROTATION", "rotationAxis": "Z", - "animationSpeed": 2, + "animationSpeed": 2.5, "rotation": -90 } ] diff --git a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json index 5d7f136b9..dd72c492a 100644 --- a/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json +++ b/src/main/resources/assets/opensignals/modeldefinitions/semaphoresignal.json @@ -391,7 +391,8 @@ { "blockstate": "with(SEMATYPE.DIST) && with(SEMAVR.VR2)", "retexture": { - "lamp2": "lamp_green_shield" + "lamp1": "lamp_green_shield", + "lamp2": "lamp_yellow_shield" } } ], From ef811ca336b52fad7d03e9de55fbb0b3fadfac40 Mon Sep 17 00:00:00 2001 From: Skywalkervalle <64580908+Skywalkervalle@users.noreply.github.com> Date: Sun, 6 Sep 2026 00:18:08 +0200 Subject: [PATCH 2/2] Fix UV mapping for ks_mast 'up' face Correct the 'up' face UV coordinates in ks_mast1/2/3/4 Models --- .../resources/assets/opensignals/models/block/ks/ks_mast1.json | 2 +- .../resources/assets/opensignals/models/block/ks/ks_mast2.json | 2 +- .../resources/assets/opensignals/models/block/ks/ks_mast3.json | 2 +- .../resources/assets/opensignals/models/block/ks/ks_mast4.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/assets/opensignals/models/block/ks/ks_mast1.json b/src/main/resources/assets/opensignals/models/block/ks/ks_mast1.json index cc9ce0063..fe9319f81 100644 --- a/src/main/resources/assets/opensignals/models/block/ks/ks_mast1.json +++ b/src/main/resources/assets/opensignals/models/block/ks/ks_mast1.json @@ -15,7 +15,7 @@ "east": {"uv": [0, 0, 0.5, 8], "texture": "#0"}, "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 8], "texture": "#0"}, - "up": {"uv": [0, 0, 0, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 8], "texture": "#0"}, "down": {"uv": [0, 0, 1, 0.5], "texture": "#0"} } } diff --git a/src/main/resources/assets/opensignals/models/block/ks/ks_mast2.json b/src/main/resources/assets/opensignals/models/block/ks/ks_mast2.json index 1da12c2ba..a6a58efc3 100644 --- a/src/main/resources/assets/opensignals/models/block/ks/ks_mast2.json +++ b/src/main/resources/assets/opensignals/models/block/ks/ks_mast2.json @@ -15,7 +15,7 @@ "east": {"uv": [0, 0, 0.5, 8], "texture": "#0"}, "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 8], "texture": "#0"}, - "up": {"uv": [0, 0, 0, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 8], "texture": "#0"}, "down": {"uv": [0, 0, 1, 0.5], "texture": "#0"} } } diff --git a/src/main/resources/assets/opensignals/models/block/ks/ks_mast3.json b/src/main/resources/assets/opensignals/models/block/ks/ks_mast3.json index 23451eccb..cb9b16183 100644 --- a/src/main/resources/assets/opensignals/models/block/ks/ks_mast3.json +++ b/src/main/resources/assets/opensignals/models/block/ks/ks_mast3.json @@ -15,7 +15,7 @@ "east": {"uv": [0, 0, 0.5, 8], "texture": "#0"}, "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 8], "texture": "#0"}, - "up": {"uv": [0, 0, 0, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 8], "texture": "#0"}, "down": {"uv": [0, 0, 1, 0.5], "texture": "#0"} } } diff --git a/src/main/resources/assets/opensignals/models/block/ks/ks_mast4.json b/src/main/resources/assets/opensignals/models/block/ks/ks_mast4.json index 85a5f37d1..f05cb2a28 100644 --- a/src/main/resources/assets/opensignals/models/block/ks/ks_mast4.json +++ b/src/main/resources/assets/opensignals/models/block/ks/ks_mast4.json @@ -16,7 +16,7 @@ "east": {"uv": [0, 0, 0.5, 8], "texture": "#0"}, "south": {"uv": [0, 0, 1, 8], "texture": "#0"}, "west": {"uv": [0, 0, 0.5, 8], "texture": "#0"}, - "up": {"uv": [0, 0, 0, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 1, 8], "texture": "#0"}, "down": {"uv": [0, 0, 1, 0.5], "texture": "#0"} } }