IntellectualSites / IntellectualSites/FastAsyncWorldEdit

Add API to Read/Write Schematic Metadata

Open
#3,534 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
Java
Stars
806
Forks
394
Avg merge
22h 19m
Merged PRs (30d)
14

Description

What feature do you want to see added?

This extension would enable a plugin to write to the metadata of a schematic, when it is saved via the plugin.

Use case:
Writing custom metadata to a Schematic would enable plugins to store external data (not in the world) in schematics.
e.g. Which player created the Schematc or plugin locations, like a particle spawner.

API:
My proposal would be to add the following methods to the FastSchematicWrite:

public void setMetadata(CompoundTag);

This CompoundTag would be written as the Metadata in the Schematic, properties like the Date or WorldEdit origin would be overwritten before writing it to the Schematic.

In the FastSchematicReader there would be:

public CompoundTag getMetadata();

This returns the metadataCompoundTag already read in the read function.

Are there any alternatives?

Writing metadata to the schematic can already be achieved by extending the schematic writer and overwriting the writeMetadata function.
Reading requires a double parsing of the schematic to extract the metadata.

Anything else?

I'd love to implement this myself, just wanted to open this issue first, to find out if this has a chance at merging.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating FastSchematicWrite and FastSchematicReader and tracing how metadata is written and read. Check how existing metadata such as the date and WorldEdit origin is handled, then verify that custom CompoundTag metadata can round-trip without breaking those behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.