Commits
Flo0 authored and md_5 committed 2b8fb83fd8d
423 423 | * Returns a list of items which would drop by the entity destroying this |
424 424 | * block with a specific tool |
425 425 | * |
426 426 | * @param tool The tool or item in hand used for digging |
427 427 | * @param entity the entity destroying the block |
428 428 | * @return a list of dropped items for this type of block |
429 429 | */ |
430 430 | |
431 431 | Collection<ItemStack> getDrops( ItemStack tool, Entity entity); |
432 432 | |
433 + | /** |
434 + | * Returns if the given item is a preferred choice to break this Block. |
435 + | * |
436 + | * In some cases this determines if a block will drop anything or extra |
437 + | * loot. |
438 + | * |
439 + | * @param tool The tool or item used for breaking this block |
440 + | * @return true if the tool is preferred for breaking this block. |
441 + | */ |
442 + | boolean isPreferredTool( ItemStack tool); |
443 + | |
433 444 | /** |
434 445 | * Checks if this block is passable. |
435 446 | * <p> |
436 447 | * A block is passable if it has no colliding parts that would prevent |
437 448 | * players from moving through it. |
438 449 | * <p> |
439 450 | * Examples: Tall grass, flowers, signs, etc. are passable, but open doors, |
440 451 | * fence gates, trap doors, etc. are not because they still have parts that |
441 452 | * can be collided with. |
442 453 | * |