API for registering custom block-state transform rules

Open
#3,024 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
api

Research direction

Start by reading BlockTransformExtent and the referenced BlockBehaviour#rotate and #mirror entry points. Compare how WorldEdit currently handles known block-state semantics with the requested custom-property case. Done means agreeing on and implementing a public mechanism for mods or plugins to provide the needed transformation behavior.

Written by the indexing model from the issue text.

Description

status:accepted type:feature-request
The Problem

WorldEdit handles block rotation and flipping through BlockTransformExtent.

This works well for block states whose spatial semantics are already understood by WorldEdit, such as facing, axis, rails, stairs, directional connection properties, etc.

However, modded blocks may contain custom block-state properties whose spatial meaning cannot be inferred by WorldEdit.

For example:

example:machine[orientation=front_left]

The mod may know how this property should behave under a 90° rotation or mirror operation, but currently there does not appear to be a public API for supplying that transformation logic to WorldEdit.

A Solution

It would be useful to expose a public API allowing mods/plugins to register transformation logic for custom block states or properties.

Or use net.minecraft.world.level.block.state.BlockBehaviour#rotate and net.minecraft.world.level.block.state.BlockBehaviour#mirror instead.

Alternatives

No response

Anything Else?

No response

Dominant language
Java
Stars
3.5k
Forks
981
Avg merge
2d 15h
Merged PRs (30d)
11

Getting set up

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.

More from EngineHub/WorldEdit

All issues in EngineHub/WorldEdit

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.