Skip to content

Commit cb19247

Browse files
committed
fix: structure files don't need DataVersion to match
1 parent 2a59fc0 commit cb19247

File tree

20 files changed

+181
-1
lines changed

20 files changed

+181
-1
lines changed

beet_observer/data_pack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import Any
22

33
import beet.contrib.worldgen as wg
4-
from beet import Context, NamespaceProxy
4+
from beet import Context, NamespaceProxy, Structure
55

66

77
def gen_dp_overlays(
@@ -214,6 +214,8 @@ def gen_registry_overlay(
214214
else:
215215
# check if files are exactly the same
216216
try:
217+
if isinstance(registry[name],Structure):
218+
registry_overlay[name].data['DataVersion'] = registry[name].data['DataVersion']
217219
if registry[name].data != registry_overlay[name].data:
218220
# move file from overlay pack to overlay in build pack
219221
ctx.data.overlays[overlay_dir][name] = registry_overlay[name]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
data_pack:
2+
load: src
3+
pack_format: 57
4+
supported_formats: [48,57]
5+
6+
pipeline:
7+
- beet_observer
8+
9+
meta:
10+
observer:
11+
default_format: 57
12+
overlays:
13+
- process: proc
135 Bytes
Binary file not shown.
127 Bytes
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"pack": {
3+
"pack_format": 48,
4+
"description": ""
5+
}
6+
}
125 Bytes
Binary file not shown.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
data_pack:
2+
load: src
3+
pack_format: 57
4+
supported_formats: [48,57]
5+
6+
pipeline:
7+
- beet_observer
8+
9+
meta:
10+
observer:
11+
default_format: 57
12+
overlays:
13+
- process: proc
127 Bytes
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"pack": {
3+
"pack_format": 48,
4+
"description": ""
5+
}
6+
}
128 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)