Hi. I develop a client side mod for single-player game. I faced such problem. Upon entering the world, the player receives blocks in his inventory. But he cannot use them. The blocks appear in the inventory, but they seem to be virtual. When the player right-clicks, the block is not placed, but the number of blocks in the inventory decreases (in survival mode). What needs to be added to the code so that the blocks are actually placed in the world?
Minecraft m = Minecraft.getInstance();
if(m != null && m.player != null && m.player.inventory != null)
{
m.player.inventory.add(1, new ItemStack(Blocks.YELLOW_WOOL, 30));
}