Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jan 20 21:07
    IceTank edited #952
  • Jan 20 21:06
    IceTank opened #952
  • Jan 20 16:43

    rom1504 on master

    docs(readme): add SteveProxy to… (compare)

  • Jan 20 16:43
    rom1504 closed #948
  • Jan 20 16:42
    rom1504 commented #950
  • Jan 16 03:18
    ShayBox commented #595
  • Jan 09 19:13
    Robbilie closed #951
  • Jan 09 19:13
    Robbilie commented #951
  • Jan 09 19:10
    Robbilie commented #949
  • Jan 09 19:09
    Robbilie reopened #949
  • Jan 09 01:30
    u9g commented #951
  • Jan 09 00:45
    Robbilie commented #951
  • Jan 08 18:03
    u9g commented #951
  • Jan 08 17:57
    Robbilie opened #951
  • Jan 08 17:54
    Robbilie closed #949
  • Jan 07 18:27
    rom1504 commented #872
  • Jan 05 19:26
    MrZillaGold commented #948
  • Jan 05 19:25
    MrZillaGold commented #948
  • Jan 05 19:24
    MrZillaGold commented #948
  • Jan 05 12:36
    Robbilie commented #949
<Lucienn> It uses a method from @xboxreplay/xboxlive-auth which doesn't use what you linked above
<Marsy> Ok thanks
<Kashall> Heads up, started noticing an increase case of getting my accounts locked. https://uwu.whats-th.is/8rkNivk.png
<Kashall> Not sure why. This is the first time im logging in with the real client after running mineflayer on the same machine since a month ago
<extremeheat> Probably on your side
<Kashall> I sure hope so
<Kashall> This one account has been locked three times
<Kashall> @extremeheat When do we plan on making microsoft the default auth btw
<Kashall> Also @extremeheat : user accounts who get locked and try to reauth using msa hit error code AADSTS70012 which is a MSA Server Error :thonk:
<extremeheat> What endpoint? Probably once mojang auth is no longer an option it would be defaulting to Microsoft accounts
<Kashall> Its a long error message but.
0|afk      | [msa] Error getting device code
0|afk      | [msa] Error getting device code
0|afk      | [msa] Error getting device code
0|afk      | [msa] Error getting device code
0|afk      | ServerError: 70012: AADSTS70012: A server error occurred while authenticating an MSA (consumer) user.
0|afk      | Trace ID: 2b36e39c-e282-4e8a-839a-92be7e0eb104
0|afk      | Correlation ID: 293eb743-f881-4c92-9c85-2384d045ca6a
0|afk      | Timestamp: 2021-12-01 03:37:35Z
0|afk      |     at ServerError.AuthError [as constructor] (/root//node_modules/@azure/msal-common/dist/index.cjs.js:477:24)
0|afk      |     at new ServerError (/root//node_modules/@azure/msal-common/dist/index.cjs.js:3060:28)
0|afk      |     at Function.ThrottlingUtils.preProcess (/root//node_modules/@azure/msal-common/dist/index.cjs.js:3096:19)
0|afk      |     at NetworkManager.<anonymous> (/root//node_modules/@azure/msal-common/dist/index.cjs.js:3181:41)
0|afk      |     at step (/root//node_modules/@azure/msal-common/dist/index.cjs.js:79:23)
0|afk      |     at Object.next (/root//node_modules/@azure/msal-common/dist/index.cjs.js:60:53)
0|afk      |     at /root//node_modules/@azure/msal-common/dist/index.cjs.js:53:71
0|afk      |     at new Promise (<~~anonymous~~>)
0|afk      |     at __awaiter (/root//node_modules/@azure/msal-common/dist/index.cjs.js:49:12)
0|afk      |     at NetworkManager.sendPostRequest (/root//node_modules/@azure/msal-common/dist/index.cjs.js:3176:16) {
0|afk      |   errorCode: '70012',
0|afk      |   errorMessage: 'AADSTS70012: A server error occurred while authenticating an MSA (consumer) user.\r\n' +
0|afk      |     'Trace ID: 2b36e39c-e282-4e8a-839a-92baaae0eb104\r\n' +
0|afk      |     'Correlation ID: 293eb742-f8r1-4c92-9c85-238aaa045ca6a\r\n' +
0|afk      |     'Timestamp: 2021-12-01 03:37:35Z',
0|afk      |   subError: ''
0|afk      | }
<extremeheat> Update your dependencies
<extremeheat> Newer Minecraft protocol does not use the azure endpoint anymore
<extremeheat> If your account is actually locked we can’t fix it, that’s something the user needs to deal with (either by waiting or contacting customer support)
<Kashall> In this case, it rebooted too many times and microsoft flagged it
<Kashall> So I had to manually intervene
<extremeheat> Well as long as caching is in place, it should not even contact the auth servers. It will just use the Minecraft session token and use that to join servers
<extremeheat> So unless the auth is already failing for some reason and you fail it many times maybe that would lock your account
<extremeheat> I’m not aware of any issues code wise that would result in it failing on our side(if the user does the password wrong, we don’t fail on outside at all)
<extremeheat> It only does the retry thing if there’s an exception in our code
<Kashall> Im not sure if like they all decided to unvaildate all at the sametime
<Kashall> Im not sure
<Kashall> But all my tokens went poof
<extremeheat> I’m not aware of any issues code wise that would result in it failing on our side(if the user does the password wrong, we don’t fail on our side at all)
<Kashall> I eventually need to figure something out with this new caching store thingy to store tokens other than in the cache folder
<Lucienn> Redis works great
<Kashall> Does redis persist over reboots?
<extremeheat> There’s nothing wrong with the file system unless you are doing IO heavy work
<extremeheat> Ultimately using other database software is going to be writing to disk also
<Lucienn> Using tokens across applications and with multiple users has been useful for me since adding redis
<extremeheat> Yeah if you have different systems that’s where the databases come into play
<Lucienn> Yes, if you sign up with redislab you can choose a free tier with 30mb
<Kashall> I have my own infrastructure right now, trying not to add more servers already lol. I have three environments, my local one, and two "prods" and I kinda get tired of copying the caches back and forth xD
<Kashall> @extremeheat Is p-auth 1.3.1 ready for prod?
<Kashall> Can we push 1.3.1 to nmp?
<rom1504> isn't that in autoguess mode already?
<rom1504> is it even needed to specify microsoft?
<Kashall> https://github.com/PrismarineJS/node-minecraft-protocol/blob/master/src/createClient.js#L37 According to this line, if you want microsoft auth, you have to be specific.
<PrismarineJS> Showing lines 27 to 47 of master/src/createClient.js
 27   const mcData = require('minecraft-data')(optVersion)
 28   if (!mcData) throw new Error(`unsupported protocol version: ${optVersion}`)
 29   const version = mcData.version
 30   options.majorVersion = version.majorVersion
 31   options.protocolVersion = version.version
 32   const hideErrors = options.hideErrors || false
 34   const client = new Client(false, version.minecraftVersion, options.customPackets, hideErrors)
 36   tcpDns(client, options)
>37   if (options.auth === 'microsoft') {
 38     microsoftAuth.authenticate(client, options)
 39   } else {
 40     auth(client, options)
 41   }
 42   if (options.version === false) autoVersion(client, options)
 43   setProtocol(client, options)
 44   keepalive(client, options)
 45   encrypt(client, options)
 46   play(client, options)
 47   compress(client, options)
<rom1504> true
<rom1504> I think it should be quite doable
<rom1504> I think it should be transparent to the user

<Kashall> @extremeheat Encountered a strange bug here with latest protocol: https://github.com/PrismarineJS/prismarine-auth/blob/0223a23039242068b11cd99a6ade184034d539d8/src/TokenManagers/LiveTokenManager.js#L160

|afk      | Error: Authentication failed, timed out
0|afk      |     at LiveTokenManager.authDeviceCode (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/TokenManagers/LiveTokenManager.js:160:11)
0|afk      |     at runMicrotasks (<anonymous>)
0|afk      |     at processTicksAndRejections (internal/process/task_queues.js:95:5)
0|afk      |     at async MicrosoftAuthFlow.getMsaToken (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:90:19)
0|afk      |     at async retry.msa.forceRefresh (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:118:26)
0|afk      |     at async retry (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:22:14)
0|afk      |     at async MicrosoftAuthFlow.getXboxToken (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:117:14)
0|afk      |     at async retry.xbl.forceRefresh (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:144:22)
0|afk      |     at async retry (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:22:14)
0|afk      |     at async MicrosoftAuthFlow.getMinecraftJavaToken (/root/MinecraftAFKBot/node_modules/prismarine-auth/src/MicrosoftAuthFlow.js:143:7)

I know this is a catch all error but forsome reason it just instantly kicks me to this error for a specific account.

<Kashall> Oh, thats interesting. Seems to be a human error. Looks like if you just recently did a device code it just fails instantly.
<extremeheat> That error means you did not sign in with the code in time
<extremeheat> The expire time in the code is conservative, it will force a failure on our side before it fails on the server side
<extremeheat> ~90% of all the auth problems are on the user side (at least when using proper oauth), there are a few edge cases but it’s just a matter of providing more detailed errors for people on what went wrong vs random request failure errors
<Abulkhaiyr> Hi, can someone help me? I don't know how to make world appear on client connection. I have this code, and commented part is the part I can't figure out.

<Abulkhaiyr> `const mc = require("minecraft-protocol");
const World = require("prismarine-world")("1.16");
const Chunk = require("prismarine-chunk")("1.16");
const Anvil = require("prismarine-provider-anvil").Anvil("1.16");
const Vec3 = require("vec3");

const server = mc.createServer({
"online-mode": true,
encryption: true,
host: "localhost",
port: 25565,
version: "1.16",
const mcData = require("minecraft-data")(server.version);
const loginPacket = mcData.loginPacket;

function generateSimpleChunk(chunkX, chunkZ) {
const chunk = new Chunk();

for (let x = 0; x < 16; x++) {
for (let z = 0; z < 16; z++) {
chunk.setBlockType(new Vec3(x, 50, z), 2);
for (let y = 0; y < 256; y++) {
chunk.setSkyLight(new Vec3(x, y, z), 15);

return chunk;

const world = new World(generateSimpleChunk, new Anvil("./world"));


server.on("login", function (client) {
client.write("login", {
entityId: client.id,
isHardcore: false,
gameMode: 0,
previousGameMode: 1,
worldNames: loginPacket.worldNames,
dimensionCodec: loginPacket.dimensionCodec,
dimension: loginPacket.dimension,
worldName: "minecraft:overworld",
hashedSeed: [0, 0],
maxPlayers: server.maxPlayers,
viewDistance: 10,
reducedDebugInfo: false,
enableRespawnScreen: true,
isDebug: false,
isFlat: false,
// client.write("map_chunk", {
// x: 0,
// z: 0,
// groundUp: true,
// biomes: chunk.dumpBiomes !== undefined ? chunk.dumpBiomes() : undefined,
// heightmaps: {
// type: "compound",
// name: "",
// value: {}, // Client will accept fake heightmap
// },
// bitMap: chunk.getMask(),
// chunkData: chunk.dump(),
// blockEntities: [],
// });
client.write("position", {
x: 15,
y: 101,
z: 15,
yaw: 137,
pitch: 0,
flags: 0x00,