WorldEdit

WorldEdit

45M Downloads

BlockType.getState() fails to obtain BlockState for Rail blocks.

Charlweed opened this issue · 4 comments

commented

WorldEdit Version

7.2.7 7.3.0-SNAPSHOT

Platform Version

spigot-1.17.1-R0.1-SNAPSHOT

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

When a Map<Property<?>,Object> is passed to a Rail BlockType, an IllegalArgumentException is thrown for all valid values of the EnumPropertyname=shape.
The method below demonstrates that even when the shape values are obtained directly from the shape EnumProperty, getState() throws an exception
“minecraft:rail has no state for {EnumProperty{name=shape}= any-value-here}”.

Expected Behavior

Obtain a BlockState instance with no errors or exceptions.

Reproduction Steps

See attached snippet.
1 Create a Map<Property<?>,Object> directly from a Rail "shape" property and a value of EnumProperty obtained from that shape property
2 Pass that map to a Rail BlockType.getState()

Anything Else?

Untitled 1.txt

commented

use discord for support.

commented

Why is this closed?

commented

No bug reports ever?

commented

This is not a bug report, this is a bug in your code. Please use Discord for support as indicated.