Skip to content

Conversation

@Machine-Maker
Copy link
Member

@Machine-Maker Machine-Maker commented Nov 24, 2024

Includes a demo of API to create arbitrary TrimPattern instances.

TrimPattern newPattern =  TrimPattern.create(builder -> { // builder is the registry entry builder 
	builder.assetId(Key.key("whatever:whatever"))
		.description(Component.text("COOL"))
		.templateItem(ItemTypeKeys.RED_WOOL)
		.decal(false)
});

ArmorTrim trim = new ArmorTrim(TrimMaterial.QUARTZ, newPattern);
// newPattern can now be used anywhere TrimPattern could before

@Machine-Maker Machine-Maker requested a review from a team as a code owner November 24, 2024 23:19
@Machine-Maker Machine-Maker force-pushed the feature/Holderable branch 5 times, most recently from cce5cb1 to ba25d19 Compare November 28, 2024 21:03
@Machine-Maker
Copy link
Member Author

I moved the API-related changes to another PR so this is just server impl changes. Those are more immediately important.

@Machine-Maker Machine-Maker force-pushed the feature/Holderable branch 2 times, most recently from 81b5bca to ec664c0 Compare December 8, 2024 05:25
@Machine-Maker
Copy link
Member Author

I added Instrument/MusicInstrument to this too, but I did not add support in ItemMeta for it, ItemMeta won't support direct holders due to serialization issues. But with this, data components should support at least getting them. Creating new ones is a separate issue for another PR.

@Machine-Maker Machine-Maker merged commit dae475b into master Dec 8, 2024
5 checks passed
@Machine-Maker Machine-Maker deleted the feature/Holderable branch December 8, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants