Skip to content

Commit

Permalink
Fixed pickaxe mining speeds in <=1.16.5
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Jul 9, 2024
1 parent 14682df commit 51ea6fc
Show file tree
Hide file tree
Showing 2 changed files with 214 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ private int[] blockJsonArrayToIds(final ProtocolVersion protocolVersion, final J
}
}
}
} else if (name.startsWith("-")) { // Block name
ids.remove(this.protocol.getMappingData().blockId(name.substring(1)));
} else { // Block name
ids.add(this.protocol.getMappingData().blockId(element.getAsString()));
ids.add(this.protocol.getMappingData().blockId(name));
}
}
return ids.toIntArray();
Expand Down
233 changes: 211 additions & 22 deletions src/main/resources/assets/viaproxy/data/item-tool-components.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,23 @@
"#stone",
"#metal",
"#repair_station",
"minecraft:nether_gold_ore"
"minecraft:nether_gold_ore",
"-minecraft:iron_block",
"-minecraft:iron_ore",
"-minecraft:lapis_block",
"-minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -137,13 +153,18 @@
"minecraft:iron_ore",
"minecraft:lapis_block",
"minecraft:lapis_ore",
"minecraft:diamond_block",
"minecraft:diamond_ore",
"minecraft:emerald_block",
"minecraft:emerald_ore",
"minecraft:gold_block",
"minecraft:gold_ore",
"minecraft:redstone_ore"
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -193,7 +214,12 @@
"minecraft:emerald_ore",
"minecraft:gold_block",
"minecraft:gold_ore",
"minecraft:redstone_ore"
"minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -232,7 +258,23 @@
"#stone",
"#metal",
"#repair_station",
"minecraft:nether_gold_ore"
"minecraft:nether_gold_ore",
"-minecraft:iron_block",
"-minecraft:iron_ore",
"-minecraft:lapis_block",
"-minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -568,7 +610,23 @@
"#stone",
"#metal",
"#repair_station",
"minecraft:nether_gold_ore"
"minecraft:nether_gold_ore",
"-minecraft:iron_block",
"-minecraft:iron_ore",
"-minecraft:lapis_block",
"-minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -673,7 +731,19 @@
"minecraft:iron_block",
"minecraft:iron_ore",
"minecraft:lapis_block",
"minecraft:lapis_ore"
"minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -785,7 +855,12 @@
"minecraft:emerald_ore",
"minecraft:gold_block",
"minecraft:gold_ore",
"minecraft:redstone_ore"
"minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -886,7 +961,23 @@
"#stone",
"#metal",
"#repair_station",
"minecraft:nether_gold_ore"
"minecraft:nether_gold_ore",
"-minecraft:iron_block",
"-minecraft:iron_ore",
"-minecraft:lapis_block",
"-minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -1106,7 +1197,23 @@
"#stone",
"#metal",
"#repair_station",
"minecraft:nether_gold_ore"
"minecraft:nether_gold_ore",
"-minecraft:iron_block",
"-minecraft:iron_ore",
"-minecraft:lapis_block",
"-minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -1211,7 +1318,19 @@
"minecraft:iron_block",
"minecraft:iron_ore",
"minecraft:lapis_block",
"minecraft:lapis_ore"
"minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -1323,7 +1442,12 @@
"minecraft:emerald_ore",
"minecraft:gold_block",
"minecraft:gold_ore",
"minecraft:redstone_ore"
"minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -1424,7 +1548,23 @@
"#stone",
"#metal",
"#repair_station",
"minecraft:nether_gold_ore"
"minecraft:nether_gold_ore",
"-minecraft:iron_block",
"-minecraft:iron_ore",
"-minecraft:lapis_block",
"-minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -1853,7 +1993,23 @@
"#stone",
"#metal",
"#repair_station",
"minecraft:nether_gold_ore"
"minecraft:nether_gold_ore",
"-minecraft:iron_block",
"-minecraft:iron_ore",
"-minecraft:lapis_block",
"-minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -1962,7 +2118,19 @@
"minecraft:iron_block",
"minecraft:iron_ore",
"minecraft:lapis_block",
"minecraft:lapis_ore"
"minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -2078,7 +2246,12 @@
"minecraft:emerald_ore",
"minecraft:gold_block",
"minecraft:gold_ore",
"minecraft:redstone_ore"
"minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down Expand Up @@ -2183,7 +2356,23 @@
"#stone",
"#metal",
"#repair_station",
"minecraft:nether_gold_ore"
"minecraft:nether_gold_ore",
"-minecraft:iron_block",
"-minecraft:iron_ore",
"-minecraft:lapis_block",
"-minecraft:lapis_ore",
"-minecraft:diamond_block",
"-minecraft:diamond_ore",
"-minecraft:emerald_block",
"-minecraft:emerald_ore",
"-minecraft:gold_block",
"-minecraft:gold_ore",
"-minecraft:redstone_ore",
"-minecraft:obsidian",
"-minecraft:crying_obsidian",
"-minecraft:netherite_block",
"-minecraft:ancient_debris",
"-minecraft:respawn_anchor"
],
"mining_speeds": [
{
Expand Down

0 comments on commit 51ea6fc

Please sign in to comment.