Hello, I'm pretty new to Forge programming (but not to programming in general), and I need to ask a thing.
I already tried to ask that in IRC but I got no response.
Anyways, I have a class 'ItemMyPickaxe' which should replace some blocks when they break.
However I didn't find anything to do this.
I tried 2 different solutions:
Using onBlockStartBreak() and then running playerEntity.worldObj.setBlock (blockX, blockY, blockZ, newblock)
That would've work perfectly, but then I realized that I need to drop even items, not just blocks. So, nope.
Then I tried again with onBlockStartBreak(), this time dropping the block manually using the code in Block.dropBlockAsItem_do().
But using that leads to 1) the drop entity not being placed correctly, for a reason unknown to me 2) the need to add the code in ItemInWorldManager.tryHarvestBlock(x,y,z). But that's too much, and also dangerous for future updates.
Can anyone help me on this?
(to make an example - a thing like Azanor's TC2 Pickaxe of the core is what I would need: it cooked the items on the fly and dropped them, but I still didn't understand how to do that)
Thank you very much,
Robertof