IntellectualSites / IntellectualSites/FastAsyncWorldEdit
Add API to Read/Write Schematic Metadata
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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