Hello, I am just learning how to create blocks which hold an inventory, and I finally finished the code. I can right-click the block to open its inventory, and the items from my inventory appear properly in the bottom. But when I attempt to pick up an item from my inventory, it seems to pick up for a moment, then immediately returns to it's original spot, preventing me from doing anything. I have no idea what I did wrong, so I'm going to post the full source code for all associated classes. I hope someone can help me, thanks!
Source Code: