@@ -2847,18 +2847,25 @@ These functions return the leftover itemstack.
2847
2847
### Schematics
2848
2848
* `minetest.create_schematic(p1, p2, probability_list, filename, slice_prob_list)`
2849
2849
* Create a schematic from the volume of map specified by the box formed by p1 and p2.
2850
- * Apply the specified probability values to the specified nodes in `probability_list`.
2850
+ * Apply the specified probability and per-node force-place to the specified nodes
2851
+ according to the `probability_list`.
2851
2852
* `probability_list` is an array of tables containing two fields, `pos` and `prob`.
2852
2853
* `pos` is the 3D vector specifying the absolute coordinates of the
2853
2854
node being modified,
2854
- * `prob` is the integer value from `0` to `255` of the probability (see: Schematic specifier).
2855
+ * `prob` is an integer value from `0` to `255` that encodes probability and
2856
+ per-node force-place. Probability has levels 0-127, then 128 is added to
2857
+ encode per-node force-place.
2858
+ For probability stated as 0-255, divide by 2 and round down to get values
2859
+ 0-127, then add 128 to apply per-node force-place.
2855
2860
* If there are two or more entries with the same pos value, the
2856
2861
last entry is used.
2857
2862
* If `pos` is not inside the box formed by `p1` and `p2`, it is ignored.
2858
2863
* If `probability_list` equals `nil`, no probabilities are applied.
2859
- * Slice probability works in the same manner, except takes a field
2860
- called `ypos` instead which
2861
- indicates the y position of the slice with a probability applied.
2864
+ * Apply the specified probability to the specified horizontal slices according to the
2865
+ `slice_prob_list`.
2866
+ * `slice_prob_list` is an array of tables containing two fields, `ypos` and `prob`.
2867
+ * `ypos` indicates the y position of the slice with a probability applied,
2868
+ the lowest slice being `ypos = 0`.
2862
2869
* If slice probability list equals `nil`, no slice probabilities are applied.
2863
2870
* Saves schematic in the Minetest Schematic format to filename.
2864
2871
0 commit comments