Skip to content

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

Open
@QuietWindUponTheMoor

Description

@QuietWindUponTheMoor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions