mojira.dev
MC-86949

/setblock's error messages are sometimes confusing

Using /setblock to place down a hopper with damage value 1 will cause an "unknown error", and the block will not be placed.

Looking in the server logs, the game tried to place a "hopper facing up", but since hoppers can't face up, it returns an error.

The game should return an error such as "minecraft:hopper cannot have a data value of 1".

Attachments

Comments

user-f2760

Because it can't face up, it sends an error, this sounds intended to me, what is the issue here?

For down use 0, south, north, west, east use 2, 3, 4, 5

James (inactive)

I mean it should return something than an "unknown error".

user-f2760

Yeah, true, something like "BLOCK cannot have a data value of DATAVALUE" is a lot more obvious

Mention it in the title/summary then (title "setblock error message confusing for example")

James (inactive)

Alright, done. Thanks 🙂

Erik Broes

Using internals gives you internal errors 🙂

marcono1234

@unknown, you should consider solving this in a different way, for example printing the exception the method net.minecraft.block.state.BlockStateContainer.StateImplementation.withProperty(IProperty<T>, V) throws and just skipping these properties. Currently when you use 3;minecraft:hopper:1;1; as Superflat preset, the game crashes because of this exception

user-f2760

@unknown the game crashing because of internal exceptions is a different issue then the message that pops up. Create a new report, and I'll link them.

marcono1234

It is now MC-101235

James (inactive)

Erik Broes

Confirmed

Minecraft 1.8.8, Minecraft 15w34d, Minecraft 15w35b, Minecraft 15w35e, Minecraft 15w36b, Minecraft 15w36c, Minecraft 15w44b

Retrieved