Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-101235

Providing wrong property values for blocks throws exception instead of ignoring property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • Minecraft 1.9.3 Pre-Release 1, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 1.11, Minecraft 1.11.2
    • Confirmed
    • (Unassigned)

      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

      1. 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")

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: