Hello everyone, so I am trying to make a player drop an item that he hold in his hand or in a case of his inventory. I tried thigs like for example " this.mc.thePlayer.dropItem " but it only drop clientSide because the item is still in my inventory and i can't pick up the item that lies on the ground.
this.mc.thePlayer.dropItem(this.mc.thePlayer.openContainer.getInventory().get(36).getItem(), 1);
// 36 is the first slot of the hotbar
I also tried sendPacketDropItem but I cannot drop item this time.
ItemStack itemJoueurStack = this.mc.thePlayer.inventory.getStackInSlot(36);
this.mc.playerController.sendPacketDropItem(itemJoueurStack);
I also tried server side but whithout sucess.
The tutorial that I followed : https://youtu.be/bvDehRIRqaM
Thank's you for helping me.
PS : I am not good at english, I did my best.