Mojang doesn't write Minecraft with mod support in mind. That means that the code can change (a lot) between versions.
Mods use that code to add new features. If the methods they use get removed between versions, that mod doesn't work on a newer version of Minecraft because it can't find that code anymore.
And with "from a user perspective" I meant: what should the user to do run this action? For example: the user presses a key or clicks a button in a GUI.
That's because your using client-side only code.
What is "exchange of packets"?
From a user perspective, when do you want this to happen in the inventory?
I understand. Google can be hard to use. Luckily, there's a website which has a nice animation to show you how to do it in the future: http://bfy.tw/K8xm
I don't know if you're coding your mod that way or that your obfuscating it (for us), but please, don't! It makes it practically impossible for us to help you. What is MDL? What is a.b.c.MDL.Category.C?
It's the way they save blocks in 1.12 and below. Blocks are saved as shorts (16 bits); 12 bits for block id (212 = 4096) and 4 bits for metadata (24 = 16). In 1.13 they changed the way they store things so we don't have that limitation anymore.