using dyskord.cc/Core
count = 0;
Java.from(mc.thePlayer.inventory.mainInventory).forEach(function (s) {s && s.getItem() instanceof ItemBlock && (count += s.stackSize)});
//converts java array to js array and uses js function
//for (i in mc.thePlayer.inventory.mainInventory) (stack = mc.thePlayer.inventory.mainInventory[i]) && stack.getItem() instanceof ItemBlock && (count += stack.stackSize);
//alternative, cycles through java array via for function
chat.print(count);
Btw the fields/methods of vanilla minecraft(not for forge and LB) are obfuscated, if you want to access to these you will have to use searge name to access it, you can find it in .minecraft/LiquidBounce-1.8/mcp-stable22srg(I don't remember the name exactly).
Btw if you are trying to use mixin in scriptAPI that should be impossible. IIRC, Senk Ju onece mentioned that mixins are loaded before the scripts, but there might still be other ways of injecting. (I tried to search in the old forum but failed to find that post)
As for "onPlaceBlock", I think you can check C08PacketPlayerBlockPlacement in onPacket.
(I don't code with mcp918 so If it's wrong way plz remind me, thanks)