Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow signs to maintain text AND position/direction with //replace or //replacenear #2546

Open
QuietWindUponTheMoor opened this issue Jun 7, 2024 · 2 comments
Labels
status:pending Pending acceptance or closure. type:feature-request Request for something new

Comments

@QuietWindUponTheMoor
Copy link

The Problem

I would like to replace a bunch of signs of one type, with another type. In this case, I would like to replace spruce signs with bamboo signs.

Using a state-applying-pattern (^) did not seem to work: //replacenear 200 minecraft:spruce_wall_sign ^minecraft:bamboo_wall_sign (For replacenear), or, for strict replace: //replace minecraft:spruce_wall_sign ^minecraft:bamboo_wall_sign

This is because sign text is NBT metadata and not covered by state-applying-pattern.

A Solution

Add functionality to com.sk89q.worldedit.function.pattern.TypeApplyingPattern to also keep NBT data, or add another pattern that allows for this to be an option when replacing blocks.

Currently, BaseBlock I was told does not have any NBT data so I'd assume this would require some modifications to how the TypeApplyingPattern class operates.

Alternatives

The only other way I can personally think of that make the process I'm trying to accomplish here to be somewhat quicker than just manually re-doing all of the signs, is going through this process, using EssentialsX:

  1. Use /editsign copy
  2. Break the old sign, place the new sign off the desired type [in this case, a bamboo sign]
  3. Use /editsign paste to paste the text back onto the new sign

This is extremely tedious and almost as slow as just doing all of the signs over by hand again.

Anything Else?

No response

@QuietWindUponTheMoor QuietWindUponTheMoor added status:pending Pending acceptance or closure. type:feature-request Request for something new labels Jun 7, 2024
@me4502
Copy link
Member

me4502 commented Jun 7, 2024

The main problem here is that NBT data cannot just be arbitrarily placed on any block. We have no way of knowing what will happen if we put the NBT data from one block onto another, and doing so could cause various major issues if it isn’t happy with it

@QuietWindUponTheMoor
Copy link
Author

The main problem here is that NBT data cannot just be arbitrarily placed on any block. We have no way of knowing what will happen if we put the NBT data from one block onto another, and doing so could cause various major issues if it isn’t happy with it

Is there not a way to do this for signs only and only maintain text data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:pending Pending acceptance or closure. type:feature-request Request for something new
Projects
None yet
Development

No branches or pull requests

2 participants