Items re-appear after being removed by procedure

Started by Hukenon on

Topic category: Troubleshooting, bugs, and solutions

Joined Aug 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Items re-appear after being removed by procedure

I'm making a mod for XP storage, basically when I use the remove item from main hand block, or remove item from inventory block, the item will temporarily disappear. If I go to a crafting table and craft any item (only 3) from my mod they will re-appear. When I use the lapis bottle for example, the bottle removes itself & gives the player an enchanted bottle (which stores the XP and removes it from player). For some reason when I use the enchanted bottle, it removes itself and gives back the XP, replacing itself with a third used bottle. If i craft the used bottle back into a lapis bottle the enchanted bottle re-appears, takes my xp back, and still gives me the new crafted bottle. No matter how I try to remove them, they always come back when any mod item is crafted.     Pictures of the only code in the mod (not much) > https://imgur.com/gallery/eKBZmDg

Joined Aug 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Should clarify i'm using…
Sat, 05/09/2020 - 23:09

Should clarify i'm using 2020.2 for 1.12.2, no rush but help would be appreciated

Joined Aug 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Tested it with a separate…
Sat, 05/09/2020 - 23:21

Tested it with a separate procedure to remove item in main hand. It works with the other bottle, but enchanted bottles (LapisbottleXP) will not delete for some reason

Joined Aug 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Figured it out, the…
Sun, 05/10/2020 - 00:26

Figured it out, the LapisbottleGetXP procedure was being called by inventory tick, I switched it to in hand and its all good. Couldn't figure out how to delete this post