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

1.20.6 #3412

Merged
merged 38 commits into from
Oct 13, 2024
Merged

1.20.6 #3412

merged 38 commits into from
Oct 13, 2024

Conversation

extremeheat
Copy link
Member

@extremeheat extremeheat commented Jul 2, 2024

Copy link

socket-security bot commented Aug 25, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] filesystem Transitive: environment +24 3.75 MB extremeheat
npm/[email protected] filesystem 0 15.9 kB zeke
npm/[email protected] Transitive: environment, filesystem, shell, unsafe +95 14.4 MB voxpelli
npm/[email protected] None 0 22.4 MB typescript-bot

View full report↗︎

@rom1504 rom1504 mentioned this pull request Sep 26, 2024
@Madlykeanu
Copy link
Contributor

Madlykeanu commented Oct 6, 2024

hey, i want to help debugging the tests since my main project uses mineflayer and i would really like to contribute to get 1.21 support faster.

however when i install everything with npm install i get the following error:
image

i can fix it by doing npm uninstall protodef and then doing npm install protodef, but then that means its not using the node_protodef branch specified by extremeheat anymore, im assuming its there for a reason, is there a way to make the node_protodef one specified by extremeheat work? or am i ok to start trying to debug the failing tests with regular protodef since i dont get the error with that.

before:
image

after "fix"
image

maybe i could also just copy the numeric.js from regular protodef into it but i just want to make sure i have the same environment you guys have

@MightyPiggie
Copy link

It seems the current failing exampleBee test case is not really failing?

I noticed it was trying to connect to the 1.20.5 server as a 1.20.6 client (I am still not sure why it does this). After setting version: '1.20.5' in the example file for all the exampleX tests it passes.

But @extremeheat said the following about this:

1.20.5 and 1.20.6 are protocol compatible, so they have the same protocol version. Since node Minecraft protocol resolves data by protocol version it will default to data from the top versionsByProtocol[version][0] version when loading data (yielding 1.20.6). This shouldn't be a problem since I added a data path mapping in mcdata for 1.20.6->1.20.5.

The item data format over the network changed so item handling may need to change.
#3406 (comment)

After which the raytrace starts to fail. This one seems to be a bit weird as well. Because when I just run that case alone, it will pass. I suspect the bot isn't being reset as it should. Because the reason it failed is because it was looking at bedrock, while it should be nothing/NULL according to the test case. Which is also the case when I just run that test alone.

The only remaining test case that is failing for sure is the trade one. But this one I haven't been able to figure out why.

I get the following error back:
Chunk size is 155 but only 132 was read ; partial packet :.
With the following packet when the bot tries to open the villager:
{ "name": "trade_list", "params": { "windowId": 1, "trades": [ { "inputItem1": { "itemCount": 805, "itemId": 1, "addedComponentCount": 0, "removedComponentCount": 1, "components": [], "removeComponents": [ { "type": 1111 } ] }, "outputItem": { "itemCount": 0 }, "inputItem2": { "itemCount": 0 }, "tradeDisabled": false, "nbTradeUses": 0, "maximumNbTradeUses": 16777216, "xp": 201326592, "specialPrice": 33554431, "priceMultiplier": -3.9316069277524514e+36, "demand": -855638016 }, { "inputItem1": { "itemCount": 60, "itemId": 805, "addedComponentCount": 1, "removedComponentCount": 0, "components": [ { "type": "max_stack_size", "data": 854 } ], "removeComponents": [] }, "outputItem": { "itemCount": 0 }, "inputItem2": { "itemCount": 0 }, "tradeDisabled": true, "nbTradeUses": -687341312, "maximumNbTradeUses": 0, "xp": 16777216, "specialPrice": 201326592, "priceMultiplier": 2.350988701644575e-38, "demand": 0 }, { "inputItem1": { "itemCount": 0 }, "outputItem": { "itemCount": 0 }, "inputItem2": { "itemCount": 0 }, "tradeDisabled": false, "nbTradeUses": 10814977, "maximumNbTradeUses": 113665, "xp": 0, "specialPrice": 1, "priceMultiplier": 1.6815581571897805e-44, "demand": 1 }, { "inputItem1": { "itemCount": 0 }, "outputItem": { "itemCount": 0 }, "inputItem2": { "itemCount": 0 }, "tradeDisabled": false, "nbTradeUses": 0, "maximumNbTradeUses": 0, "xp": -1526333184, "specialPrice": 28378624, "priceMultiplier": 1.4816629312538453e-40, "demand": 16777216 } ], "villagerLevel": 0, "experience": 0, "isRegularVillager": true, "canRestock": false } }

Whats strange is that the itemCount and itemId are flipped for the inputItem1. Because the villager is asking for a emerald, which has Id 805, but according to the packed the itemId is 1.

The missing bytes is most likely because of the outputItem being empty, which should be filled with 1111 as itemId (pumpkin_pie). So I guess something is missing in the protocol. I am not sure why yet. I looked into this. According to the wiki.vg the protocol should be correct. I also looked into the 1.20.5 server jar. As far as my understand goes, it is in line with the protocol on the wiki. But I definitely could be wrong tho.

@extremeheat
Copy link
Member Author

Yeah, looking at buffer you seem to be correct. Wiki.vg incorrectly lists the trade_list input 1&2 as being a Slot but it doesn't appear to be a normal Slot type.

2d - trade_list (ClientboundMerchantOffersPacket)
01 - windowId varint
04 - trade count
a5 - inputItem1.count varint (??)
06 - inputItem.id (??)
010001d70800000000000000010000000c00000001fffffffc3d4ccccd0000003ca506010001d606000001d708010000000000010000000c00000001000000000000000000000000a506010001bc0100000000000000010000000c00000001000000000000000000000000a506010001b1060000019d07010000000000010000000c0000000100000000000000000000000001000101

Looking at code, MerchantOffer is not writing an Item but an ItemCost for both items (though the result is an ItemSlot).
https://github.com/extremeheat/extracted_minecraft_data/blob/client1.20.5/client/net/minecraft/world/item/trading/MerchantOffer.java#L210

Which indeed puts the ID before the count, then writing the components (?).

https://github.com/extremeheat/extracted_minecraft_data/blob/client1.20.5/client/net/minecraft/world/item/trading/ItemCost.java

@extremeheat
Copy link
Member Author

extremeheat commented Oct 12, 2024

Fixed the villager trading issue in mcdata.

    // TODO: 1.20.5+ does not seem to respect "Count" NBT anymore in /give
    // ...as NBT was removed in favor of components that may have something to do

As Count in /summon isn't working anymore on 1.20.5 (and tests are setting expected Count to 2), I'm loosening the tests which are strict on item quantity to just ensure item count is >=1.

But otherwise mineflayer API is working.

[08:21:17] [Server thread/INFO]: [@: Summoned new Villager]
{ // trade packet
  windowId: 1,
  trades: [
    {
      inputItem1: {
        itemId: 805,
        itemCount: 1,
        addedComponentCount: 0,
        components: []
      },
      outputItem: {
        itemCount: 1,
        itemId: 1111,
        addedComponentCount: 0,
        removedComponentCount: 0,
        components: [],
        removeComponents: []
      },
      inputItem2: undefined,
      tradeDisabled: false,
      nbTradeUses: 1,
      maximumNbTradeUses: 12,
      xp: 1,
      specialPrice: -4,
      priceMultiplier: 0.05000000074505806,
      demand: 60
    },
    {
      inputItem1: {
        itemId: 805,
        itemCount: 1,
        addedComponentCount: 0,
        components: []
      },
      outputItem: {
        itemCount: 1,
        itemId: 854,
        addedComponentCount: 0,
        removedComponentCount: 0,
        components: [],
        removeComponents: []
      },
      inputItem2: {
        itemId: 1111,
        itemCount: 1,
        addedComponentCount: 0,
        components: []
      },
      tradeDisabled: false,
      nbTradeUses: 1,
      maximumNbTradeUses: 12,
      xp: 1,
      specialPrice: 0,
      priceMultiplier: 0,
      demand: 0
    },
    {
      inputItem1: {
        itemId: 805,
        itemCount: 1,
        addedComponentCount: 0,
        components: []
      },
      outputItem: {
        itemCount: 1,
        itemId: 188,
        addedComponentCount: 0,
        removedComponentCount: 0,
        components: [],
        removeComponents: []
      },
      inputItem2: undefined,
      tradeDisabled: false,
      nbTradeUses: 1,
      maximumNbTradeUses: 12,
      xp: 1,
      specialPrice: 0,
      priceMultiplier: 0,
      demand: 0
    },
    {
      inputItem1: {
        itemId: 805,
        itemCount: 1,
        addedComponentCount: 0,
        components: []
      },
      outputItem: {
        itemCount: 1,
        itemId: 817,
        addedComponentCount: 0,
        removedComponentCount: 0,
        components: [],
        removeComponents: []
      },
      inputItem2: {
        itemId: 925,
        itemCount: 1,
        addedComponentCount: 0,
        components: []
      },
      tradeDisabled: false,
      nbTradeUses: 1,
      maximumNbTradeUses: 12,
      xp: 1,
      specialPrice: 0,
      priceMultiplier: 0,
      demand: 0
    }
  ],
  villagerLevel: 1,
  experience: 0,
  isRegularVillager: true,
  canRestock: true
}
Opened villager
Window {
  _events: [Object: null prototype] {
    close: [Function: bound onceWrapper] { listener: [Function (anonymous)] }
  },
  _eventsCount: 1,
  _maxListeners: undefined,
  acceptOutsideWindowClick: [Function: acceptClick],
  acceptInventoryClick: [Function: acceptClick],
  acceptNonInventorySwapAreaClick: [Function: acceptClick],
  acceptSwapAreaLeftClick: [Function: acceptClick],
  acceptSwapAreaRightClick: [Function: acceptClick],
  acceptCraftingClick: [Function: acceptClick],
  id: 1,
  type: 'minecraft:merchant',
  title: {
    type: 'compound',
    value: {
      hoverEvent: {
        type: 'compound',
        value: {
          contents: {
            type: 'compound',
            value: {
              name: {
                type: 'compound',
                value: {
                  translate: {
                    type: 'string',
                    value: 'entity.minecraft.villager.none'
                  }
                }
              },
              id: {
                type: 'intArray',
                value: [ 2081437318, 631719051, -1815023737, 1785188917 ]
              },
              type: { type: 'string', value: 'minecraft:villager' }
            }
          },
          action: { type: 'string', value: 'show_entity' }
        }
      },
      insertion: { type: 'string', value: '7c103686-25a7-448b-93d0-ef876a67d235' },
      translate: { type: 'string', value: 'entity.minecraft.villager.none' }
    }
  },
  slots: [
    null,
    null,
    null,
    Item {
      type: 805,
      count: 64,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'emerald',
      displayName: 'Emerald',
      stackSize: 64,
      maxDurability: undefined,
      slot: 3
    },
    Item {
      type: 805,
      count: 64,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'emerald',
      displayName: 'Emerald',
      stackSize: 64,
      maxDurability: undefined,
      slot: 4
    },
    Item {
      type: 805,
      count: 64,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'emerald',
      displayName: 'Emerald',
      stackSize: 64,
      maxDurability: undefined,
      slot: 5
    },
    Item {
      type: 805,
      count: 64,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'emerald',
      displayName: 'Emerald',
      stackSize: 64,
      maxDurability: undefined,
      slot: 6
    },
    Item {
      type: 805,
      count: 64,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'emerald',
      displayName: 'Emerald',
      stackSize: 64,
      maxDurability: undefined,
      slot: 7
    },
    Item {
      type: 805,
      count: 64,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'emerald',
      displayName: 'Emerald',
      stackSize: 64,
      maxDurability: undefined,
      slot: 8
    },
    Item {
      type: 805,
      count: 64,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'emerald',
      displayName: 'Emerald',
      stackSize: 64,
      maxDurability: undefined,
      slot: 9
    },
    Item {
      type: 805,
      count: 64,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'emerald',
      displayName: 'Emerald',
      stackSize: 64,
      maxDurability: undefined,
      slot: 10
    },
    Item {
      type: 805,
      count: 64,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'emerald',
      displayName: 'Emerald',
      stackSize: 64,
      maxDurability: undefined,
      slot: 11
    },
    Item {
      type: 925,
      count: 11,
      metadata: 0,
      nbt: null,
      components: [],
      removedComponents: [],
      stackId: null,
      name: 'book',
      displayName: 'Book',
      stackSize: 64,
      maxDurability: undefined,
      slot: 12
    },
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null
  ],
  inventoryStart: 3,
  inventoryEnd: 39,
  hotbarStart: 30,
  craftingResultSlot: 2,
  requiresConfirmation: true,
  selectedItem: null,
  close: [Function (anonymous)],
  withdraw: [AsyncFunction (anonymous)],
  deposit: [AsyncFunction (anonymous)],
  trades: [
    {
      inputItem1: Item {
        type: 805,
        count: 1,
        metadata: 0,
        nbt: null,
        components: [],
        removedComponents: undefined,
        stackId: null,
        name: 'emerald',
        displayName: 'Emerald',
        stackSize: 64,
        maxDurability: undefined
      },
      outputItem: Item {
        type: 1111,
        count: 1,
        metadata: 0,
        nbt: null,
        components: [],
        removedComponents: [],
        stackId: null,
        name: 'pumpkin_pie',
        displayName: 'Pumpkin Pie',
        stackSize: 64,
        maxDurability: undefined
      },
      inputItem2: undefined,
      tradeDisabled: false,
      nbTradeUses: 1,
      maximumNbTradeUses: 12,
      xp: 1,
      specialPrice: -4,
      priceMultiplier: 0.05000000074505806,
      demand: 60,
      inputs: [
        Item {
          type: 805,
          count: 1,
          metadata: 0,
          nbt: null,
          components: [],
          removedComponents: undefined,
          stackId: null,
          name: 'emerald',
          displayName: 'Emerald',
          stackSize: 64,
          maxDurability: undefined
        }
      ],
      hasItem2: false,
      outputs: [
        Item {
          type: 1111,
          count: 1,
          metadata: 0,
          nbt: null,
          components: [],
          removedComponents: [],
          stackId: null,
          name: 'pumpkin_pie',
          displayName: 'Pumpkin Pie',
          stackSize: 64,
          maxDurability: undefined
        }
      ],
      realPrice: 1
    },
    {
      inputItem1: Item {
        type: 805,
        count: 1,
        metadata: 0,
        nbt: null,
        components: [],
        removedComponents: undefined,
        stackId: null,
        name: 'emerald',
        displayName: 'Emerald',
        stackSize: 64,
        maxDurability: undefined
      },
      outputItem: Item {
        type: 854,
        count: 1,
        metadata: 0,
        nbt: null,
        components: [],
        removedComponents: [],
        stackId: null,
        name: 'wheat',
        displayName: 'Wheat',
        stackSize: 64,
        maxDurability: undefined
      },
      inputItem2: Item {
        type: 1111,
        count: 1,
        metadata: 0,
        nbt: null,
        components: [],
        removedComponents: undefined,
        stackId: null,
        name: 'pumpkin_pie',
        displayName: 'Pumpkin Pie',
        stackSize: 64,
        maxDurability: undefined
      },
      tradeDisabled: false,
      nbTradeUses: 1,
      maximumNbTradeUses: 12,
      xp: 1,
      specialPrice: 0,
      priceMultiplier: 0,
      demand: 0,
      inputs: [
        Item {
          type: 805,
          count: 1,
          metadata: 0,
          nbt: null,
          components: [],
          removedComponents: undefined,
          stackId: null,
          name: 'emerald',
          displayName: 'Emerald',
          stackSize: 64,
          maxDurability: undefined
        },
        Item {
          type: 1111,
          count: 1,
          metadata: 0,
          nbt: null,
          components: [],
          removedComponents: undefined,
          stackId: null,
          name: 'pumpkin_pie',
          displayName: 'Pumpkin Pie',
          stackSize: 64,
          maxDurability: undefined
        }
      ],
      hasItem2: true,
      outputs: [
        Item {
          type: 854,
          count: 1,
          metadata: 0,
          nbt: null,
          components: [],
          removedComponents: [],
          stackId: null,
          name: 'wheat',
          displayName: 'Wheat',
          stackSize: 64,
          maxDurability: undefined
        }
      ],
      realPrice: 1
    },
    {
      inputItem1: Item {
        type: 805,
        count: 1,
        metadata: 0,
        nbt: null,
        components: [],
        removedComponents: undefined,
        stackId: null,
        name: 'emerald',
        displayName: 'Emerald',
        stackSize: 64,
        maxDurability: undefined
      },
      outputItem: Item {
        type: 188,
        count: 1,
        metadata: 0,
        nbt: null,
        components: [],
        removedComponents: [],
        stackId: null,
        name: 'glass',
        displayName: 'Glass',
        stackSize: 64,
        maxDurability: undefined
      },
      inputItem2: undefined,
      tradeDisabled: false,
      nbTradeUses: 1,
      maximumNbTradeUses: 12,
      xp: 1,
      specialPrice: 0,
      priceMultiplier: 0,
      demand: 0,
      inputs: [
        Item {
          type: 805,
          count: 1,
          metadata: 0,
          nbt: null,
          components: [],
          removedComponents: undefined,
          stackId: null,
          name: 'emerald',
          displayName: 'Emerald',
          stackSize: 64,
          maxDurability: undefined
        }
      ],
      hasItem2: false,
      outputs: [
        Item {
          type: 188,
          count: 1,
          metadata: 0,
          nbt: null,
          components: [],
          removedComponents: [],
          stackId: null,
          name: 'glass',
          displayName: 'Glass',
          stackSize: 64,
          maxDurability: undefined
        }
      ],
      realPrice: 1
    },
    {
      inputItem1: Item {
        type: 805,
        count: 1,
        metadata: 0,
        nbt: null,
        components: [],
        removedComponents: undefined,
        stackId: null,
        name: 'emerald',
        displayName: 'Emerald',
        stackSize: 64,
        maxDurability: undefined
      },
      outputItem: Item {
        type: 817,
        count: 1,
        metadata: 0,
        nbt: {
          type: 'compound',
          name: '',
          value: { Damage: { type: 'int', value: 0 } }
        },
        components: [],
        removedComponents: [],
        stackId: null,
        name: 'wooden_sword',
        displayName: 'Wooden Sword',
        stackSize: 1,
        maxDurability: 1
      },
      inputItem2: Item {
        type: 925,
        count: 1,
        metadata: 0,
        nbt: null,
        components: [],
        removedComponents: undefined,
        stackId: null,
        name: 'book',
        displayName: 'Book',
        stackSize: 64,
        maxDurability: undefined
      },
      tradeDisabled: false,
      nbTradeUses: 1,
      maximumNbTradeUses: 12,
      xp: 1,
      specialPrice: 0,
      priceMultiplier: 0,
      demand: 0,
      inputs: [
        Item {
          type: 805,
          count: 1,
          metadata: 0,
          nbt: null,
          components: [],
          removedComponents: undefined,
          stackId: null,
          name: 'emerald',
          displayName: 'Emerald',
          stackSize: 64,
          maxDurability: undefined
        },
        Item {
          type: 925,
          count: 1,
          metadata: 0,
          nbt: null,
          components: [],
          removedComponents: undefined,
          stackId: null,
          name: 'book',
          displayName: 'Book',
          stackSize: 64,
          maxDurability: undefined
        }
      ],
      hasItem2: true,
      outputs: [
        Item {
          type: 817,
          count: 1,
          metadata: 0,
          nbt: {
            type: 'compound',
            name: '',
            value: { Damage: { type: 'int', value: 0 } }
          },
          components: [],
          removedComponents: [],
          stackId: null,
          name: 'wooden_sword',
          displayName: 'Wooden Sword',
          stackSize: 1,
          maxDurability: 1
        }
      ],
      realPrice: 1
    }
  ],
  selectedTrade: null,
  trade: [AsyncFunction (anonymous)],
  [Symbol(shapeMode)]: false,
  [Symbol(kCapture)]: false
}
I have 576x Emerald 
I can trade 1x Emerald  for 1x Pumpkin Pie
[08:21:17] [Server thread/INFO]: [Not Secure]  I have 576x Emerald 
[08:21:17] [Server thread/INFO]: [Not Secure]  I can trade 1x Emerald  for 1x Pumpkin Pie
[08:21:17] [Server thread/INFO]: flatbot has made the advancement [What a Deal!]
I have 565x Emerald and 11x Pumpkin Pie
I can trade 1x Emerald and 1x Pumpkin Pie for 1x Wheat
[08:21:18] [Server thread/INFO]: [Not Secure]  I have 565x Emerald and 11x Pumpkin Pie
[08:21:18] [Server thread/INFO]: [Not Secure]  I can trade 1x Emerald and 1x Pumpkin Pie for 1x Wheat
I have 554x Emerald 
I can trade 1x Emerald  for 1x Glass
[08:21:18] [Server thread/INFO]: [Not Secure]  I have 554x Emerald 
[08:21:18] [Server thread/INFO]: [Not Secure]  I can trade 1x Emerald  for 1x Glass
I have 543x Emerald and 11x Book
I can trade 1x Emerald and 1x Book for 1x Wooden Sword
[08:21:18] [Server thread/INFO]: [Not Secure]  I have 543x Emerald and 11x Book
[08:21:18] [Server thread/INFO]: [Not Secure]  I can trade 1x Emerald and 1x Book for 1x Wooden Sword
/kill @e[type=villager]
     trade (2716ms)

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

Example bee still fails with Error: Do not have protocol data for protocol version 766 (attempted to use 765 data

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

765 is 1.20.4
766 is 1.20.5

We seem to have both in mcdata

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

Feels like it's because const versionInfo = minecraftData.versionsByMinecraftVersion.pc[version]
Is returning the wrong thing for 1.20.5

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

1.20.1 and 1.20.2 fail on this :

mineflayer_internal 1.20.2v
chat:
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/mineflayer/mineflayer/test/internalTest.js)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

https://github.com/PrismarineJS/node-minecraft-protocol/pull/1309/files has a bunch of chat related changes

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

https://github.com/extremeheat/mineflayer/blob/1.20.5/test/internalTest.js#L110 test is here, probably needed to update the packets sent by the internal server

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

updated all deps except nmp

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

still getting

[22:09:14] [Server thread/INFO]: [Not Secure] ### Starting exampleBee
Error: Do not have protocol data for protocol version 766 (attempted to use 765 data)
at createProtocol (/home/runner/work/mineflayer/mineflayer/node_modules/minecraft-protocol/src/transforms/serializer.js:27:11)
at createSerializer (/home/runner/work/mineflayer/mineflayer/node_modules/minecraft-protocol/src/transforms/serializer.js:49:25)
at Client.setSerializer (/home/runner/work/mineflayer/mineflayer/node_modules/minecraft-protocol/src/client.js:42:23)
at set state [as state] (/home/runner/work/mineflayer/mineflayer/node_modules/minecraft-protocol/src/client.js:133:10)
at /home/runner/work/mineflayer/mineflayer/node_modules/minecraft-protocol/src/client/autoVersion.js:43:18
at /home/runner/work/mineflayer/mineflayer/node_modules/minecraft-protocol/src/ping.js:13:7
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

something wrong with the version data in relation with auto version detection

I expect there's some duplicate/wrong protocol version

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

reproduce with npm run mocha_test -- -g "mineflayer_external 1.20.5v exampleBee"

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

I see; 1.20.6 has the same protocol version as 1.20.5 and auto version assumes latest

@rom1504 rom1504 changed the title 1.20.5 1.20.6 Oct 12, 2024
@rom1504 rom1504 marked this pull request as ready for review October 12, 2024 23:11
@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

moving to 1.20.6 support; skipping 1.20.5

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

some regression in 1.13.2

1 failing

  1. mineflayer_external 1.13.2v
    heldItem:
    AssertionError [ERR_ASSERTION]: Item {
    count: 1,
    displayName: 'Stone',
    maxDurability: undefined,
    metadata: 0,
    name: 'stone',
    nbt: null,
    slot: 36,
    stackId: null,
    stackSize: 64,
    type: 1
    } == null

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

  1) mineflayer_external 1.20.6v
       rayTrace:
     AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected

+ Block {
+   _properties: {},
+   biome: {
+     color: 0,
+     height: null,
+     id: 39,
+     name: '',
+     rainfall: 0,
+     temperature: 0
+   },

finds bedrock instead of null

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

could something have changed with chunks?

welcome for investigations there

look at wiki.vg and the code source and other implementations

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

ahh

After which the raytrace starts to fail. This one seems to be a bit weird as well. Because when I just run that case alone, it will pass. I suspect the bot isn't being reset as it should. Because the reason it failed is because it was looking at bedrock, while it should be nothing/NULL according to the test case. Which is also the case when I just run that test alone.

ok that sounds easy to fix

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

npm run mocha_test -- -g "mineflayer_external 1.20.6v rayTrace"

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

reproduce with

npm run mocha_test -- -g "mineflayer_external 1.20.6v nether|mineflayer_external 1.20.6v rayTrace"

problem is nether test

@rom1504
Copy link
Member

rom1504 commented Oct 12, 2024

btw joining the server of the test is pretty cool. nice demo of mineflayer

I think we should try again to auto generate videos with the client

@rom1504
Copy link
Member

rom1504 commented Oct 13, 2024

npm run mocha_test -- -g "mineflayer_internal 1.20.6v entities 'itemDrop' event"

to reproduce

@rom1504
Copy link
Member

rom1504 commented Oct 13, 2024

Slot type in entity metadata

@rom1504
Copy link
Member

rom1504 commented Oct 13, 2024

I tested jumper, digger, inventory ; it works

@rom1504
Copy link
Member

rom1504 commented Oct 13, 2024

merging

@rom1504
Copy link
Member

rom1504 commented Oct 13, 2024

thanks @extremeheat for implementing almost everything for 1.20.6 support in all repos!

@rom1504 rom1504 merged commit 44fad41 into PrismarineJS:master Oct 13, 2024
23 checks passed
@rom1504
Copy link
Member

rom1504 commented Oct 13, 2024

/makerelease

@rom1504bot rom1504bot mentioned this pull request Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

4 participants