Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some blocks don't have the harvestTools tag. #3426

Open
1 task done
Jalvaviel opened this issue Jul 29, 2024 · 1 comment
Open
1 task done

Some blocks don't have the harvestTools tag. #3426

Jalvaviel opened this issue Jul 29, 2024 · 1 comment
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f

Comments

@Jalvaviel
Copy link

Jalvaviel commented Jul 29, 2024

  • The FAQ doesn't contain a resolution to my issue

Versions

  • mineflayer: 1.7 - 21w07a
  • server: vanilla/spigot/paper (not related)
  • node: (not related)

Detailed description of a problem

Some blocks in minecraft-data library don't contain the harvestTools tag. The problem lies in that these blocks can in fact break quicker with a tool. E.g (mushroom_stem can be mined quicker with an axe), (melon can be mined quicker with an axe) (oak_fence_gate can be mined quicker with an axe)...

What did you try yet?

I'm just modifying the json myself, but I noticed there are tons of blocks with this problem.

Did you try any method from the API?
Not related

Did you try any example? Any error from those?
No

Your current code

  {
    "id": 319,
    "name": "oak_fence_gate",
    "displayName": "Oak Fence Gate",
    "hardness": 2.0,
    "resistance": 3.0,
    "stackSize": 64,
    "diggable": true,
    "material": "mineable/axe",
    "transparent": false,
    "emitLight": 0,
    "filterLight": 0,
    "defaultState": 7004,
    "minStateId": 6997,
    "maxStateId": 7028,
    "states": [
      {
        "name": "facing",
        "type": "enum",
        "num_values": 4,
        "values": [
          "north",
          "south",
          "west",
          "east"
        ]
      },
      {
        "name": "in_wall",
        "type": "bool",
        "num_values": 2
      },
      {
        "name": "open",
        "type": "bool",
        "num_values": 2
      },
      {
        "name": "powered",
        "type": "bool",
        "num_values": 2
      }
    ],
    "drops": [
      712
    ],
    "boundingBox": "block"
  },

Expected behavior

I want to get the best tool to mine these blocks and not resort to mining them with a fist.

Additional context

I'm posting this as a bug, since I don't think it's intended behaviour, but could be a suggestion too.

@Jalvaviel Jalvaviel added possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f labels Jul 29, 2024
@BF5258
Copy link

BF5258 commented Sep 26, 2024

Some blocks in minecraft-data library don't contain the harvestTools tag. The problem lies in that these blocks can in fact break quicker with a tool. E.g (mushroom_stem can be mined quicker with an axe)

"material": "mineable/axe" means it mines faster with an axe.
harvestTools is present if and only if the block will not drop an item unless one of these tools are used; for example diamond ore only drops if it is mined using iron_pickaxe, diamond_pickaxe, or netherite_pickaxe. mushroom_stem does not have the harvestTools tag because it drops mushrooms regardless of the tool used.

 {
    "id": 179,
    "name": "diamond_ore",
    "displayName": "Diamond Ore",
    "hardness": 3.0,
    "resistance": 3.0,
    "stackSize": 64,
    "diggable": true,
    "material": "mineable/pickaxe",
    "transparent": false,
    "emitLight": 0,
    "filterLight": 15,
    "defaultState": 4274,
    "minStateId": 4274,
    "maxStateId": 4274,
    "states": [],
    "harvestTools": {
      "794": true,
      "799": true,
      "804": true
    },
    "drops": [
      764
    ],
    "boundingBox": "block"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Stage1 just created by someone new to the project, we don't know yet if it deserves an implementation / a f
Projects
None yet
Development

No branches or pull requests

2 participants