Skip to content

Commit

Permalink
ref: rework semaphore lamps
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeronimo97 committed Nov 5, 2024
1 parent 04828d7 commit 2ec6bec
Show file tree
Hide file tree
Showing 24 changed files with 1,948 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,30 @@
}
]
},
"semaphore_signals/sema_main_wing1_lamp": {
"translationX": 0.6875,
"translationY": 7.5625,
"translationZ": 0,
"pivotX": -0.6875,
"pivotY": -0.5625,
"pivotZ": 0,
"animationConfigs": [
{
"predicate": "with(WING1.FALSE) && with(SEMATYPE.MAIN)",
"mode": "ROTATION",
"rotationAxis": "Z",
"animationSpeed": 0.5,
"rotation": 0
},
{
"predicate": "with(WING1.TRUE) && with(SEMATYPE.MAIN)",
"mode": "ROTATION",
"rotationAxis": "Z",
"animationSpeed": 0.5,
"rotation": -25
}
]
},
"semaphore_signals/sema_main_wing2": {
"translationX": 0.6875,
"translationY": 5.5625,
Expand All @@ -44,6 +68,30 @@
}
]
},
"semaphore_signals/sema_main_wing2_lamp": {
"translationX": 0.6875,
"translationY": 5.5625,
"translationZ": 0,
"pivotX": -0.6875,
"pivotY": -0.5625,
"pivotZ": 0,
"animationConfigs": [
{
"predicate": "with(WING2.FALSE) && with(SEMATYPE.MAIN)",
"mode": "ROTATION",
"rotationAxis": "Z",
"animationSpeed": 0.5,
"rotation": 0
},
{
"predicate": "with(WING2.TRUE) && with(SEMATYPE.MAIN)",
"mode": "ROTATION",
"rotationAxis": "Z",
"animationSpeed": 0.5,
"rotation": -25
}
]
},
"semaphore_signals/sema_main_wing1_small": {
"translationX": 0.6875,
"translationY": 4.5625,
Expand All @@ -66,6 +114,30 @@
}
]
},
"semaphore_signals/sema_main_wing1_small_lamp": {
"translationX": 0.6875,
"translationY": 4.5625,
"translationZ": 0,
"pivotX": -0.6875,
"pivotY": -0.5625,
"pivotZ": 0,
"animationConfigs": [
{
"predicate": "!hasandis(WING1) && with(SEMATYPE.MAIN_SMALL)",
"mode": "ROTATION",
"rotationAxis": "Z",
"animationSpeed": 0.5,
"rotation": 0
},
{
"predicate": "hasandis(WING1) && with(SEMATYPE.MAIN_SMALL)",
"mode": "ROTATION",
"rotationAxis": "Z",
"animationSpeed": 0.5,
"rotation": -25
}
]
},
"semaphore_signals/sema_main_wing2_small": {
"translationX": 0.6875,
"translationY": 2.5625,
Expand All @@ -88,6 +160,30 @@
}
]
},
"semaphore_signals/sema_main_wing2_small_lamp": {
"translationX": 0.6875,
"translationY": 2.5625,
"translationZ": 0,
"pivotX": -0.6875,
"pivotY": -0.5625,
"pivotZ": 0,
"animationConfigs": [
{
"predicate": "!hasandis(WING2) && with(SEMATYPE.MAIN_SMALL)",
"mode": "ROTATION",
"rotationAxis": "Z",
"animationSpeed": 0.5,
"rotation": 0
},
{
"predicate": "hasandis(WING2) && with(SEMATYPE.MAIN_SMALL)",
"mode": "ROTATION",
"rotationAxis": "Z",
"animationSpeed": 0.5,
"rotation": -25
}
]
},
"semaphore_signals/sema_distant_plate": {
"translationX": 0,
"translationY": 3.875,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@
"semaphore_signals/sema_mainsmall_mast2_hp2": {
"textures": [
{
"blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandis(HP2)"
"blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandis(HP2) && with(WING2.FALSE)"
},
{
"blockstate": "with(SEMATYPE.MAIN_SMALL) && hasandis(HP2) && with(WING2.TRUE)",
"retexture": {
"lamp": "lamp_yellow_shield"
}
}
],
"y": 2
Expand Down Expand Up @@ -106,7 +112,13 @@
"semaphore_signals/sema_mainsmall_mast4": {
"textures": [
{
"blockstate": "with(SEMATYPE.MAIN_SMALL)"
"blockstate": "with(SEMATYPE.MAIN_SMALL) && with(WING1.FALSE)"
},
{
"blockstate": "with(SEMATYPE.MAIN_SMALL) && with(WING1.TRUE)",
"retexture": {
"lamp": "lamp_green_shield"
}
}
],
"y": 4
Expand All @@ -122,7 +134,13 @@
"semaphore_signals/sema_main_mast5_hp2": {
"textures": [
{
"blockstate": "with(SEMATYPE.MAIN) && hasandis(HP2)"
"blockstate": "with(SEMATYPE.MAIN) && hasandis(HP2) && with(WING2.FALSE)"
},
{
"blockstate": "with(SEMATYPE.MAIN) && hasandis(HP2) && with(WING2.TRUE)",
"retexture": {
"lamp": "lamp_yellow_shield"
}
}
],
"y": 5
Expand All @@ -138,7 +156,13 @@
"semaphore_signals/sema_main_mast7": {
"textures": [
{
"blockstate": "with(SEMATYPE.MAIN)"
"blockstate": "with(SEMATYPE.MAIN) && with(WING1.FALSE)"
},
{
"blockstate": "with(SEMATYPE.MAIN) && with(WING1.TRUE)",
"retexture": {
"lamp": "lamp_green_shield"
}
}
],
"y": 7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@
"credit": "Made with Blockbench by Mc_Jeronimo",
"texture_size": [32, 32],
"textures": {
"1": "opensignals:blocks/default/shield_black",
"3": "opensignals:blocks/semaphore/lamps_shield_off",
"particle": "opensignals:blocks/default/shield_black"
},
"elements": [
{
"name": "shield",
"from": [10.5, 2, 6],
"to": [16.5, 12, 7],
"from": [10.5, 2, 6.9],
"to": [16.5, 12, 6.9],
"faces": {
"north": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#3"},
"east": {"uv": [0, 0, 0.5, 5], "texture": "#1"},
"south": {"uv": [0, 0, 3, 5], "texture": "#1"},
"west": {"uv": [0, 0, 0.5, 5], "texture": "#1"},
"up": {"uv": [0, 0, 3, 0.5], "texture": "#1"},
"down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}
"south": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#3"}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@
"credit": "Made with Blockbench by Mc_Jeronimo",
"texture_size": [32, 32],
"textures": {
"1": "opensignals:blocks/default/shield_black",
"3": "opensignals:blocks/semaphore/lamps_shield_off",
"particle": "opensignals:blocks/default/shield_black"
},
"elements": [
{
"name": "shield",
"from": [-0.5, 13, 6],
"to": [5.5, 23, 7],
"from": [-0.5, 13, 6.9],
"to": [5.5, 23, 6.9],
"faces": {
"north": {"uv": [0, 0, 10, 6], "rotation": 270, "texture": "#3"},
"east": {"uv": [0, 0, 0.5, 5], "texture": "#1"},
"south": {"uv": [0, 0, 3, 5], "texture": "#1"},
"west": {"uv": [0, 0, 0.5, 5], "texture": "#1"},
"up": {"uv": [0, 0, 3, 0.5], "texture": "#1"},
"down": {"uv": [0, 0, 3, 0.5], "texture": "#1"}
"south": {"uv": [0, 0, 10, 6], "rotation": 90, "texture": "#3"}
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"textures": {
"0": "opensignals:blocks/default/mast",
"2": "opensignals:blocks/default/shield_gray",
"3": "opensignals:blocks/default/shield_black",
"particle": "opensignals:blocks/semaphore/lamp_yellow",
"lamp1": "opensignals:blocks/semaphore/lamp_yellow",
"lamp2": "opensignals:blocks/semaphore/lamp_yellow"
Expand Down Expand Up @@ -38,12 +39,12 @@
"from": [4.5, 19, 7],
"to": [7, 21, 9],
"faces": {
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
"north": {"uv": [0, 0, 2, 2], "texture": "#3"},
"east": {"uv": [0, 0, 2, 2], "texture": "#3"},
"south": {"uv": [0, 0, 2, 2], "texture": "#3"},
"west": {"uv": [0, 0, 2, 2], "texture": "#3"},
"up": {"uv": [0, 0, 2, 2], "texture": "#3"},
"down": {"uv": [0, 0, 2, 2], "texture": "#3"}
}
},
{
Expand All @@ -52,11 +53,11 @@
"to": [4.5, 22, 11],
"faces": {
"north": {"uv": [0, 0, 4, 4], "texture": "#lamp1"},
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
"east": {"uv": [0, 0, 2, 2], "texture": "#3"},
"south": {"uv": [0, 0, 2, 2], "texture": "#3"},
"west": {"uv": [0, 0, 2, 2], "texture": "#3"},
"up": {"uv": [0, 0, 2, 2], "texture": "#3"},
"down": {"uv": [0, 0, 2, 2], "texture": "#3"}
}
},
{
Expand All @@ -65,24 +66,24 @@
"to": [15.5, 7, 11],
"faces": {
"north": {"uv": [0, 0, 4, 4], "texture": "#lamp2"},
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
"east": {"uv": [0, 0, 2, 2], "texture": "#3"},
"south": {"uv": [0, 0, 2, 2], "texture": "#3"},
"west": {"uv": [0, 0, 2, 2], "texture": "#3"},
"up": {"uv": [0, 0, 2, 2], "texture": "#3"},
"down": {"uv": [0, 0, 2, 2], "texture": "#3"}
}
},
{
"name": "bracket2",
"from": [9, 4, 7],
"to": [11.5, 6, 9],
"faces": {
"north": {"uv": [0, 0, 2, 2], "texture": "#0"},
"east": {"uv": [0, 0, 2, 2], "texture": "#0"},
"south": {"uv": [0, 0, 2, 2], "texture": "#0"},
"west": {"uv": [0, 0, 2, 2], "texture": "#0"},
"up": {"uv": [0, 0, 2, 2], "texture": "#0"},
"down": {"uv": [0, 0, 2, 2], "texture": "#0"}
"north": {"uv": [0, 0, 2, 2], "texture": "#3"},
"east": {"uv": [0, 0, 2, 2], "texture": "#3"},
"south": {"uv": [0, 0, 2, 2], "texture": "#3"},
"west": {"uv": [0, 0, 2, 2], "texture": "#3"},
"up": {"uv": [0, 0, 2, 2], "texture": "#3"},
"down": {"uv": [0, 0, 2, 2], "texture": "#3"}
}
},
{
Expand Down
Loading

0 comments on commit 2ec6bec

Please sign in to comment.