Skip to content

Add the rendershape command#13

Open
haykam821 wants to merge 1 commit intoNucleoidMC:1.16from
haykam821:rendershape-command
Open

Add the rendershape command#13
haykam821 wants to merge 1 commit intoNucleoidMC:1.16from
haykam821:rendershape-command

Conversation

@haykam821
Copy link
Contributor

This pull request adds a command that can be used to quickly test out the appearance of a rendered shape in-game by placing a layer representing that shape using black and white concrete.

@haykam821 haykam821 added the enhancement New feature or request label Dec 1, 2020
@haykam821 haykam821 requested a review from Gegy December 1, 2020 02:49
MapShapeRenderer.REGISTRY.register(new Identifier(Spleef.ID, "square"), SquareShapeRenderer.CODEC);
MapShapeRenderer.REGISTRY.register(new Identifier(Spleef.ID, "pattern"), PatternShapeRenderer.CODEC);

ArgumentTypes.register("spleef:map_shape_renderer", MapShapeRendererArgumentType.class, new ConstantArgumentSerializer<MapShapeRendererArgumentType>(MapShapeRendererArgumentType::mapShapeRenderer));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registering argument types breaks compatibility with vanilla clients I am fairly sure

MapShapeRenderer.REGISTRY.register(new Identifier(Spleef.ID, "pattern"), PatternShapeRenderer.CODEC);

ArgumentTypes.register("spleef:map_shape_renderer", MapShapeRendererArgumentType.class, new ConstantArgumentSerializer<MapShapeRendererArgumentType>(MapShapeRendererArgumentType::mapShapeRenderer));
CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably only register this in dev environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants