Topic category: Help with MCreator software
Okay, sorry if this has been discussed elsewhere, if it was I missed it. I am currently working on a mod that incorporates many RPG elements into minecraft. I've gotten a lot to work but I am having one issue. I would like to add Encumbrance to the game. The best way I can figure to do this would be to set a Local Variable for the blocks/items name it Weight, and give it a value. Then on my Master Player Code that runs on Update Tick, the code would calculate the weight of each item in the inventory (which will be easier after the next update according to the change log), and then slow the player's speed based on how heavy their items are.
My issue is I have been trying to find a way for my master procedure to read a local variable from the block/item that is in my inventory. Essentially "code A" reads local variable from "code B" and makes use of the data. I've tried many ways and can't figure how to do this. Any help would be great, thanks!