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

Command /replaceitem with commandblocks is bugged

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.8.1
    • None
    • Java 1.8.0_31, Windows 7, OptiFine installed , Craftbukkit Server
    • Unconfirmed

      I have a machine that detects if an Item is taken out of a specific slot in the inventory and replace it with the same item soon after it was taken out of the inventory. It is for an Inventory menu that does certain thing when you click/remove items in your Inevtory.

      The problem now is that you cannot click the same item twice in a row because it wont fill the slot again. It works perfectly fine when I click different items.

      How to reproduce the bug: Build a Commandblock attached to a clock with

      /testfor @a[team=Inventorymenu] {Inventory:[{Slot:9b}]}
       

      and attach it to a solid block via comparator. Put a redstone torch on the other side. Place a repeater with 1 tick delay at the torch and attatch another commandblock to it with

      /replaceitem entity @a[team=Inventorymenu] slot.inventory.0 golden_apple 1 0 {display:{Name:"Teleport to Admin Launch",Lore:[Destroy item to change setting]}}
       

      then put another repeater down that points at the 2nd commandblock and give it a button to activiate.

      If you now put a golden apple in the top left corner of your Inventory and move it to a different slot another apple will spawn in the top left corner. Now take the apple away immediately after it spawns and it wont respawn. The /testfor cmdblock will act like the apple was still there even though it should be updated every few ticks by the clock.
      And the even more weird thing is that if you press the button to activate the /replaceitem cmdblock now nothing will happen. No apple. The only solution is to plac an apple manually in the top left to "reload" it I guess.

      I made a screenshot to show you how to build the machine.
      And please mind that I have a scoreboard team set. This is necessary to reproduce the bug since it doesn't apper without the team filter (team=Inventorymenu). The tester has to be in that team.

      I hope I could help and you can fix this

      P.S.
      Unfortunately your uoload function didn't work so I uploaded the screenshot to imgur

      http://imgur.com/9aMw4sU

            Unassigned Unassigned
            Ziron5 Simon mueller
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: