Providing wrong property values for blocks throws exception instead of ignoring property
The bug
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The method net.minecraft.block.state.BlockStateContainer.StateImplementation.withProperty(IProperty<T>, V) throws an IllegalArgumentException if a invalid value for a property is given. This is problematic because there are multiple situations in which the user can directly provide a value.
I would instead expect it to ignore this property but print a error message in the log.
How to reproduce
- Use the following superflat preset
3;minecraft:hopper:1;1;
The game will crash because the value "1" is invalid as facing value (it would be "up")
Linked Issues
Created Issue:
Providing wrong property values for blocks throws exception instead of ignoring property
Relates to:
The bug
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The method net.minecraft.block.state.BlockStateContainer.StateImplementation.withProperty(IProperty<T>, V) throws an IllegalArgumentException if a invalid value for a property is given. This is problematic because there are multiple situations in which the user can directly provide a value.
I would instead expect it to ignore this property but print a error message in the log.
How to reproduce
- Use the following superflat preset
3;minecraft:hopper:1;1;The game will crash because the value "1" is invalid as facing value (it would be "up")
Relates to:
The bug
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The method net.minecraft.block.state.BlockStateContainer.StateImplementation.withProperty(IProperty<T>, V) throws an IllegalArgumentException if a invalid value for a property is given. This is problematic because there are multiple situations in which the user can directly provide a value.
I would instead expect it to ignore this property but print a error message in the log.
How to reproduce
- Use the following superflat preset
3;minecraft:hopper:1;1;The game will crash because the value "1" is invalid as facing value (it would be "up")
The bug
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The method net.minecraft.block.state.BlockStateContainer.StateImplementation.withProperty(IProperty<T>, V) throws an IllegalArgumentException if a invalid value for a property is given. This is problematic because there are multiple situations in which the user can directly provide a value.
I would instead expect it to ignore this property but print a error message in the log.
How to reproduce
- Use the following superflat preset
3;minecraft:hopper:1;1;The game will crash because the value "1" is invalid as facing value (it would be "up")
relates to
is blocked by
Nicely done, this way it creates a crash and the bug gets accepted as a bug, other than
MC-86949. I don't like if bugs that really are bugs just get marked as invalid or "works as intended".
It is now MC-101235
Cannot reproduce this in 20w07a also due to MC-118624.
The general solution proposed here to ignore unknown properties and log them might not actually be that good.
This issue can no longer be reproduced due to the resolution of MC-118624.