We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ce4816 commit 21b723bCopy full SHA for 21b723b
1 file changed
templates/bake_registry/call.py
@@ -3,6 +3,7 @@
3
from pathlib import Path
4
import sys
5
import json
6
+import math
7
8
if len(sys.argv) != 2:
9
sys.exit(1)
@@ -62,6 +63,11 @@ def sort(x: dict):
62
63
64
output_registry.sort(key=sort)
65
data = json.dumps(output_registry, indent="\t")
66
+ lines = [
67
+ f"data modify storage minecraft:bubblellaneous registry.{category} set value {data.replace('\n', '\\\n')}",
68
+ f"scoreboard players set registry.{category}.size bbln.var {len(output_registry)}",
69
+ f"scoreboard players set registry.{category}.pages bbln.var {math.ceil(len(output_registry) / 18)}",
70
+ ]
71
path.write_text(
- f"data modify storage minecraft:bubblellaneous registry.{category} set value {data.replace('\n', '\\\n')}"
72
+ "\n".join(lines),
73
)
0 commit comments