FastAsyncWorldEdit

FastAsyncWorldEdit

152k Downloads

sweet_berry_bush name

LucasT-dev opened this issue ยท 3 comments

commented

Server Implementation

Paper

Server Version

1.20.1

Describe the bug

Change the name of "sweet_berry_bush" to "sweet_berry_bush" to match the name given by mojang
This poses some problems when using the API

To Reproduce

//set sweet_berries

/setblock 0 0 0 minecraft:sweet_berry_bush

Expected behaviour

//set sweet_berry_bush

Screenshots / Videos

No response

Error log (if applicable)

No response

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/332cc6ebf5494eaf9fdaffcee828be3a

Fawe Version

FastAsyncWorldEdit-Bukkit-2.7.2-SNAPSHOT-560

Checklist

Anything else?

No response

commented

I don't understand this issue. The block id is sweet_berry_bush and this is also the value that is accepted by FAWE.
What exactly is the problem here?

commented

I'm sorry, but in fact the problem doesn't come from Minecraft,

The item in the hand is sweet_berries

But by placing it it turns into a block and becomes: SWEET_BERRIES_BUSH

So when I get the item in my hand and it is a sweet berry I get an error.

Whereas when I use SWEET_BERRIES_BUSH I have no problems.

CaptureSWEET

2023-09-18_20 58 03

commented

Items aren't blocks. This is handled terribly in Spigot but not an issue with FAWE.

Spigot will also prevent you from creating a BlockData object (the equivalent of BlockState) for items: Material.SWEET_BERRIES.createBlockData() throws an exception.

By the way, there is no 1 to 1 mapping of items to blocks. For example an oak_sign item can be, when placed, either result in an oak_sign block or an oak_wall_sign block. Another example: spawn eggs, they don't have any associated block type at all!

I don't know if Spigot exposes a way to simulate placing an item to get the resulting block state, but this is out of scope of this bug tracker, so you'll need to ask somewhere else.