Begin port to 26.3: movement

This commit is contained in:
Tanner
2026-11-03 22:48:15 +00:00
parent 891f14b988
commit 59c76471f2
23 changed files with 30692 additions and 478 deletions
+30 -26
View File
@@ -1,32 +1,36 @@
"""Minecraft 26.3 client data used by the automation layer.
The generated data is vendored under ``mosfet/info/data/26.3`` from
RosegoldMC/minecraft-data.cr (MIT); see that directory's LICENSE.
"""
import json
from munch import Munch
from pathlib import Path
from types import SimpleNamespace
import minecraft_data
DATA_VERSION = '26.3'
DATA_DIR = Path(__file__).resolve().parent / 'data' / DATA_VERSION
mcd = minecraft_data('1.16.4')
with open('minecraft_data/registries.json') as f:
DATA = json.load(f)
def _load(name):
with (DATA_DIR / name).open(encoding='utf-8') as source:
return json.load(source)
SINGLE_CHEST = 2
DOUBLE_CHEST = 5
VILLAGER_TRADE = 18
WINDOWS = {
SINGLE_CHEST: Munch(
container=list(range(0, 27)),
inventory=list(range(27, 63)),
slot_diff=18,
),
DOUBLE_CHEST: Munch(
container=list(range(0, 54)),
inventory=list(range(54, 90)),
slot_diff=45,
),
VILLAGER_TRADE: Munch(
input1=0,
input2=1,
output=2,
inventory=list(range(3, 38)),
),
}
block_list = _load('blocks.json')
item_list = _load('items.json')
entity_list = _load('entities.json')
materials = _load('materials.json')
collision_shapes = _load('blockCollisionShapes.json')
blocks = {block['name']: block for block in block_list}
items = {item['name']: item for item in item_list}
entities = {entity['name']: entity for entity in entity_list}
mcd = SimpleNamespace(
version=DATA_VERSION,
blocks=blocks,
items=items,
entities=entities,
materials=materials,
collision_shapes=collision_shapes,
)