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

Tripwire hook at invalid position does not drop when another tripwire hook is placed next to it

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.11.2, Minecraft 17w17b, Minecraft 1.12 Pre-Release 5
    • Fix Version/s: None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      A tripwire hook at an invalid position does not drop if another tripwire hook is placed next to it. Since most if not all other blocks which require a supporting block do not have a special case like this, the expected behavior would be that the tripwire hook breaks regardless of which block was placed next to it.

      How to reproduce

      Note

      In general there parameters passed to net.minecraft.block.Block.neighborChanged(IBlockState, World, BlockPos, Block, BlockPos) are pretty inconsistent. To reproduce this bug the second parameter (Block) has to be a tripwire hook. This can be achieved by using /setblock or /fill (which passes the new block), but not by placing a tripwire hook (which passes the previous block).

      1. Fill multiple non-tripwire hooks which require a supporting block, like torches
        /fill ~ ~ ~ ~ ~2 ~ torch
        

        → They break and drop

      2. Fill multiple tripwire hook blocks
        /fill ~ ~ ~ ~ ~2 ~ tripwire_hook
        

        → They do not break

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      The method net.minecraft.block.BlockTripWireHook.neighborChanged(IBlockState, World, BlockPos, Block, BlockPos) does not test if the tripwire hook should drop if the block parameter is a tripwire hook as well.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              marcono1234 [Mod] Marcono1234
            • Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                CHK: