Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Microsoft tokens does not work under 1.16.1 MC version


Recommended Posts

Hi everyone,

I'm working on how to get Microsoft tokens on all the versions, and I found that under 1.16.1 versions of MC, Forge does not take the Microsoft tokens.
I've found the MSMC library (that's really cool!), but the library does not resolve my issue 😬.

I'm using MCLC library for launch/download the game.
 

Really thanks for your help and have a good day,
Corentin de Maupeou

 

Here's the error message

Quote

[10:52:24] [main/ERROR] [LaunchWrapper]: Unable to launch java.lang.RuntimeException: An error occurred trying to configure the Minecraft home at /Users/.../.minecraft for Forge

 

Here's my codes for the funcs :

ipcMain.handle('microsoft_login', () => {
    return new Promise((resolve, reject) => {
        msmc.fastLaunch('raw', console.log).then(result => {
            if (msmc.errorCheck(result)) return reject(result.reason)

            if (result.type !== 'Success')
                return dialog.showErrorBox('Oups ! Une erreur est survenue, veuillez réessayer (004)', Errors.microsoft_account)
            else
                resolve(JSON.stringify(result))
        }).catch(reject)
    })
})

ipcMain.handle('microsoft_refresh', (e, data) => {
    return new Promise((resolve, reject) => {
        const account = data.account

        msmc.refresh(account.profile, console.log)
            .then(e => resolve(JSON.stringify(e)))
            .catch(reject)
    })
})

 

Here's my code for giving to MCLC the tokens : 

// Adding auth
        if (localStorage.getItem('microsoft_account'))
            options = {
                authorization: msmc.getMCLC().getAuth(JSON.parse(localStorage.getItem('microsoft_account'))),
                ...options
            }
        else
            options = {
                authorization: {
                    access_token: e.access_token,
                    client_token: e.client_token,
                    uuid: e.uuid,
                    name: e.name,
                    user_properties: e.user_properties
                },
                ...options
            }
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Hmm, I might just do some sort of jimmy rig to get around this. Do something like make a block model in blockbench that is slightly large than a normal block (something like 0.01 on each side to prevent z-fighting), draw the textures and just have the blocks act as a multipart. (I really hope this can end up transparent and not just blackout the texture underneath) Might be messy, but I really just want to get this done to move onto something else (been working on this one feature for maybe a month because IRL stuff). Thanks for the suggestions anyways mate (I can probably use them for some other crazy idea later).
    • I'm now facing an issue when serializing and deserializing, I better know how NBT works but when using Gson I can only serialize to a file which looks like this:  {"mainInventory":[{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}}],"armorSlots":[{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}},{"tagMap":{"id":{"data":"minecraft:air"},"Count":{"data":1}}}]} But when it comes to deserialization, Gson doesn't work... I won't upload the full log but important bits I cannot understand: [11:32:13.645] [Server thread/ERROR] [EventBus/EVENTBUS]: Exception caught during firing event: Unable to invoke no-args constructor for interface net.minecraft.nbt.INBT. Register an InstanceCreator with Gson for this type may fix this problem. Index: 1 Listeners: 0: NORMAL 1: ASM: class com.example.examplemod.Event.PlayerEvents onPlayerChangeDimension(Lnet/minecraftforge/event/entity/player/PlayerEvent$PlayerChangedDimensionEvent;)V java.lang.RuntimeException: Unable to invoke no-args constructor for interface net.minecraft.nbt.INBT. Register an InstanceCreator with Gson for this type may fix this problem. Caused by: java.lang.UnsupportedOperationException: Interface can't be instantiated! Interface name: net.minecraft.nbt.INBT Thank you in advance, and sorry for the long waiting time.
    • In this Class:  package net.the_goldbeards.lootdebugs.Server; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.network.NetworkRegistry; import net.the_goldbeards.lootdebugs.LootDebugsMain; public class SimpleChannel { private static final String PROTICOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation("corruption","main") ,() -> PROTICOL_VERSION , PROTICOL_VERSION::equals , PROTICOL_VERSION::equals); }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.