Skip to content

Commit a9cc403

Browse files
committed
next.txt
1 parent 1d00003 commit a9cc403

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

next.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
These features will be in an extension module, that is not imported by default.
2-
For the features that already ei
2+
For the features that already exist (aka updates to existing features), they are still implemented in the main file.
3+
4+
Move the following things into the extension module:
5+
- ImageDisplay
6+
- MeshDisplay
7+
8+
Update documentation to add a [ext] tag to all features that are in the extension module, and update the type stub as well.
9+
10+
Make the bridge module a proper module (a folder, with __init__.py) and split it into multiple files.
11+
The extension module will be imported as `from bridge.extensions import xyz`. each feature will have its own file.
312

413
- BossBarDisplay:
514
- Rename linked cooldown attribute to linked_to, since after this it can be many things.

src/main/resources/python/bridge.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4276,7 +4276,6 @@ def _update_argb(self, argb_list: list[int]) -> None:
42764276
if entries and _connection is not None:
42774277
_connection.send_fire_forget("update_entities", entries=entries)
42784278

4279-
42804279
class MeshDisplay:
42814280
"""Render 3D triangle mesh using TextDisplay entities with greedy meshing.
42824281
@@ -4714,7 +4713,6 @@ def update(self, face_colors: "list[tuple[int,int,int,int]] | None" = None,
47144713
if entries and _connection is not None:
47154714
_connection.send_fire_forget("update_entities", entries=entries)
47164715

4717-
47184716
class Menu:
47194717
"""Interactive chest GUI menu with click handlers.
47204718
@@ -5232,7 +5230,6 @@ def _toml_dumps(data: Dict[str, Any]) -> str:
52325230
_toml_write_table(data, [], lines)
52335231
return "\n".join(lines) + "\n"
52345232

5235-
52365233
def _toml_write_table(data: Dict[str, Any], path: List[str], lines: List[str]):
52375234
"""Recursively write a TOML table, emitting simple keys first, then sub-tables."""
52385235
for key, value in data.items():
@@ -5260,15 +5257,13 @@ def _toml_write_table(data: Dict[str, Any], path: List[str], lines: List[str]):
52605257
lines.append(f"[[{'.'.join(_toml_key(p) for p in sub_path)}]]")
52615258
_toml_write_table(item, sub_path, lines)
52625259

5263-
52645260
def _toml_key(key: str) -> str:
52655261
"""Return a bare TOML key if safe, otherwise a quoted key."""
52665262
if key and all(c.isalnum() or c in "-_" for c in key):
52675263
return key
52685264
escaped = key.replace("\\", "\\\\").replace('"', '\\"')
52695265
return f'"{escaped}"'
52705266

5271-
52725267
def _toml_value(value: Any) -> str:
52735268
"""Encode a Python value as a TOML value string."""
52745269
if isinstance(value, bool):
@@ -5289,7 +5284,6 @@ def _toml_value(value: Any) -> str:
52895284
escaped = str(value).replace("\\", "\\\\").replace('"', '\\"')
52905285
return f'"{escaped}"'
52915286

5292-
52935287
def _properties_load(path: str) -> Dict[str, Any]:
52945288
"""Load a Java-style .properties file into a nested dict."""
52955289
data: Dict[str, Any] = {}
@@ -5317,7 +5311,6 @@ def _properties_load(path: str) -> Dict[str, Any]:
53175311
_properties_set_nested(data, key, _properties_parse_value(val_str))
53185312
return data
53195313

5320-
53215314
def _properties_set_nested(data: Dict[str, Any], key: str, value: Any):
53225315
"""Set a dot-separated key path in a nested dict."""
53235316
parts = key.split(".")
@@ -5328,7 +5321,6 @@ def _properties_set_nested(data: Dict[str, Any], key: str, value: Any):
53285321
node = cast(Dict[str, Any], node[part])
53295322
node[parts[-1]] = value
53305323

5331-
53325324
def _properties_parse_value(value: str) -> Any:
53335325
"""Parse a properties value string into an appropriate Python type."""
53345326
if not value:
@@ -5354,7 +5346,6 @@ def _properties_dumps(data: Dict[str, Any]) -> str:
53545346
_properties_flatten(data, [], lines)
53555347
return "\n".join(lines) + "\n"
53565348

5357-
53585349
def _properties_flatten(data: Dict[str, Any], path: List[str], lines: List[str]):
53595350
"""Flatten a nested dict into dot-separated key=value lines."""
53605351
for key, value in data.items():

0 commit comments

Comments
 (0)