Skip to content

Commit 95744f1

Browse files
authored
Update precise-rotation.md
1 parent 1596440 commit 95744f1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/blocks/precise-rotation.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: Precise Rotation
3+
description: This tutorial guides you through making a block with sub-cardinal rotation (e.g. creeper heads and signs), providing examples of a shell block with this rotation type.
34
category: Tutorials
45
tags:
56
- expert
67
- scripting
78
mentions:
89
- QuazChick
910
- SmokeyStack
10-
description: This tutorial guides you through making a block with sub-cardinal rotation (e.g. creeper heads and signs), providing examples of a shell block with this rotation type.
1111
---
1212

1313
::: tip FORMAT & MIN ENGINE VERSION `1.21.40`
@@ -380,10 +380,10 @@ Add the following component to your block:
380380
"minecraft:geometry": {
381381
"identifier": "geometry.shell", // Model created in first step
382382
"bone_visibility": {
383-
"up_0": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('wiki:rotation'), 4)",
384-
"up_22_5": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('wiki:rotation') - 1, 4)",
385-
"up_45": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('wiki:rotation') - 2, 4)",
386-
"up_67_5": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('wiki:rotation') - 3, 4)",
383+
"up_0": "q.block_state('minecraft:block_face') == 'up' && math.mod(q.block_state('wiki:rotation'), 4) == 0",
384+
"up_22_5": "q.block_state('minecraft:block_face') == 'up' && math.mod(q.block_state('wiki:rotation'), 4) == 1",
385+
"up_45": "q.block_state('minecraft:block_face') == 'up' && math.mod(q.block_state('wiki:rotation'), 4) == 2",
386+
"up_67_5": "q.block_state('minecraft:block_face') == 'up' && math.mod(q.block_state('wiki:rotation'), 4) == 3",
387387
"side": "q.block_state('minecraft:block_face') != 'up'"
388388
}
389389
}
@@ -452,10 +452,10 @@ Your block JSON and script files after the above steps should look similar to th
452452
"minecraft:geometry": {
453453
"identifier": "geometry.shell",
454454
"bone_visibility": {
455-
"up_0": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('wiki:rotation'), 4)",
456-
"up_22_5": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('wiki:rotation') - 1, 4)",
457-
"up_45": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('wiki:rotation') - 2, 4)",
458-
"up_67_5": "q.block_state('minecraft:block_face') == 'up' && !math.mod(q.block_state('wiki:rotation') - 3, 4)",
455+
"up_0": "q.block_state('minecraft:block_face') == 'up' && math.mod(q.block_state('wiki:rotation'), 4) == 0",
456+
"up_22_5": "q.block_state('minecraft:block_face') == 'up' && math.mod(q.block_state('wiki:rotation'), 4) == 1",
457+
"up_45": "q.block_state('minecraft:block_face') == 'up' && math.mod(q.block_state('wiki:rotation'), 4) == 2",
458+
"up_67_5": "q.block_state('minecraft:block_face') == 'up' && math.mod(q.block_state('wiki:rotation'), 4) == 3",
459459
"side": "q.block_state('minecraft:block_face') != 'up'"
460460
}
461461
},

0 commit comments

Comments
 (0)