Solved Block.breakNaturally(ItemStack) problem

Discussion in 'Spigot Plugin Development' started by Nemo_64, Feb 22, 2020.

  1. As the api says "Breaks the block and spawns items as if a player had digged it with a specific tool"
    How ever it doesn't respect the enchantments on the item, the xp that the block may drop and the tool doesn't get damaged. Is there any other method of doing this that respects at least the enchantments and the xp?
  2. Don't know of one,i use that event to make it look better(not have the block dissapear)as it spawns the break particles, you can always manually do the xp/durability part though dont think thats too big of a problem
  3. I know how to spawn entities and the minecraft wiki shows the formula that I have to use for tools with umbreaking so thats no proble. I was asking just to not waste my time making my own code if the api provides it
    Thanks anyways
  4. md_5

    Administrator Developer

    This is fixed in 1.14, update
    • Winner Winner x 1
  5. This is still not working for me :/
    No XP and the item durability isn't affected.
    I'm using Paper 1.16.1, and I don't believe they changed the way breakNaturally works.
  6. I recomend you creating a new post