You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/routes/guide/adding-new-features/smithing-trims/+page.svx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -225,7 +225,7 @@ And next, we are going to modify `assets/minecraft/atlases/blocks.json`:
225
225
Here, the key-value pair under `permutations` should be the same as the `asset_name` field from the datapack file we created before.
226
226
227
227
Now, we will need to create the actual material color palette texture. Since we are using Vanilla's default `palette_key`, this image needs to have a width of 8 and a height of 1. You can see an example palette below.
228
-
This image should be saved in `assets/<namespace>/textures/trims/color_palettes/` as `matexample.png`
228
+
This image should be saved in `assets/<namespace>/textures/trims/color_palettes/` as `matexample.png`.
229
229
230
230
<img src="https://i.postimg.cc/Yqyvq7vt/pallete.png" alt="Example color palette" width="300" style="image-rendering: pixelated; image-rendering: crisp-edges;">
231
231
@@ -369,7 +369,7 @@ This example will make the `diamond_pickaxe` a smithable item. This time, the da
369
369
370
370
### Finishing up with the resourcepack - Smithable Item
371
371
372
-
In the resourcepack, we'll need to customize the diamond pickaxe's item model definition. This is located inside of `assets/minecraft/items/`
372
+
In the resourcepack, we'll need to customize the diamond pickaxe's item model definition. This is located inside of `assets/minecraft/items/`.
Copy file name to clipboardExpand all lines: src/routes/guide/misc/raycasts/+page.svx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,8 @@ something to it.
23
23
24
24
Firstly, we'll make the function which, when you run it, will **start** the raycast. In this function, we'll want to:
25
25
26
-
- set the **maximum distance** for the raycast, so it won't go on forever if it never hits an entity.
27
-
- run the function at the eyes of the player
26
+
- Set the **maximum distance** for the raycast, so it won't go on forever if it never hits an entity.
27
+
- Run the function at the eyes of the player.
28
28
29
29
To set a maximum distance, we store the maximum amount of times we want the function to run in a scoreboard. Every time the recursive function runs, we want to subtract one from that scoreboard, and only continue if the score is more than 0.
Copy file name to clipboardExpand all lines: src/routes/guide/nbt-and-scores/array-iteration/+page.svx
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,11 @@ data modify storage minecraft:example ExampleArray set value ["Array Item 1", "A
14
14
```
15
15
16
16
The steps to iterate through the array are:
17
-
1. Store the length of the array in a score
18
-
2. Do something with the first element in the array (`array[0]`) - you can either just read the element, or modify it
17
+
1. Store the length of the array in a score.
18
+
2. Do something with the first element in the array (`array[0]`) - you can either just read the element, or modify it.
19
19
3. Copy the first element to the end of the array, then remove the first element.
20
-
4. Decrease the length score by 1
21
-
5. If the length score is 1 or more, repeat from step 2 until it isn't
20
+
4. Decrease the length score by 1.
21
+
5. If the length score is 1 or more, repeat from step 2 until it isn't.
22
22
23
23
First, we need a function which will begin the process. This is where we do step 1 and then run the loop function:
24
24
@@ -31,7 +31,7 @@ execute store result $length <objective> run data get storage minecraft:example
31
31
execute if score $length <objective> matches 1.. run function <namespace>:array_loop
32
32
```
33
33
34
-
In the `array_loop` function, you can do whatever you want to the array item, including modifying it. In this example, we will send the array item to chat, and then replace it with `"Iterated"`
34
+
In the `array_loop` function, you can do whatever you want to the array item, including modifying it. In this example, we will send the array item to chat, and then replace it with `"Iterated"`.
35
35
36
36
```mcfunction:array_loop.mcfunction
37
37
# We can access the current array item with "storage minecraft:example ExampleArray[0]"
Copy file name to clipboardExpand all lines: src/routes/guide/nbt-and-scores/division/+page.svx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ version: 1.21.7
6
6
7
7
# Division with floating points
8
8
Typically, we can use `scoreboard players operation` to divide two numbers in Minecraft. However, this command will only output an integer. If the result of the division is a decimal number, it is always rounded down. To divide numbers with decimal points, we need to use a workaround:
9
-
1. Multiply the dividend by a large factor of 10 (e.g `1000000`)
10
-
2. Divide the numbers using `scoreboard players operation`
9
+
1. Multiply the dividend by a large factor of 10 (e.g `1000000`).
10
+
2. Divide the numbers using `scoreboard players operation`.
11
11
3. Store the result to a data storage, scaling it down by the same factor of 10.
12
12
13
13
Here is an example of how to divide two arbitrary integer numbers:
Copy file name to clipboardExpand all lines: src/routes/guide/nbt-and-scores/player-id-system/+page.svx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ Finally, we need to make this function run when a player first joins the world.
41
41
```
42
42
43
43
## Find the player/entity with a specific ID
44
-
We can use a predicate to check if the player has the same ID as the specified ID (stored in a fake player on a scoreboard). In this case, this predicate will only trigger if the player's `playerid` score is equal to the `playerid` score of the fake player (`#this`)
44
+
We can use a predicate to check if the player has the same ID as the specified ID (stored in a fake player on a scoreboard). In this case, this predicate will only trigger if the player's `playerid` score is equal to the `playerid` score of the fake player (`#this`).
0 commit comments