Fix pickaxe mining speeds in <=1.16.5

This commit is contained in:
RaphiMC 2024-07-10 01:02:40 +02:00
parent d4f6c29fff
commit 6adfdcf8ac
No known key found for this signature in database
GPG Key ID: 0F6BB0657A03AC94
2 changed files with 214 additions and 23 deletions

View File

@ -177,8 +177,10 @@ public abstract class MixinBlockItemPacketRewriter1_20_5 extends ItemRewriter<Cl
}
}
}
} 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();

View File

@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{
@ -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": [
{