mega12345mega / NBT-Editor

Edit items, blocks, and entities in-game.
MIT License
47 stars 14 forks source link

What's the SessionChanger thing for? #3

Closed sudofox closed 2 years ago

sudofox commented 2 years ago

I noticed in a recent commit some files for a 'session changer' were removed, though within the latest release on Curseforge I still see the class files. I was alarmed at first, seeing various methods to authenticate a Minecraft account and such, which seems unnecessary.

Could you provide some background info as to what's going on with that, just to clear things up?

Additionally, any chance of adding in the gradle build files so we can easily compile the mod ourselves?

mega12345mega commented 2 years ago

The sessionchanger package is for testing with my account. When using the development environment, you get a random unauthenticated account, which prevents you from logging into servers. This was a problem, as I wanted to test on a proper server to make sure the item creation and deletion wasn't buggy. Using the sessionchanger, I could log into my account, allowing me to join the servers.

It isn't referenced in the code. In NBTEditorClient, in "onInitializeClient", you can see commented out: SessionChanger.getInstance().loginMicrosoftUser(); I uncomment it when testing on servers, as it opens up Microsoft's login page allowing me to change the session to mega12345mega.

The project doesn't rely on it at all, which is why I removed it from github. You should be able to remove it from the .jar file directly (I'm not sure if that will cause errors, I haven't ever tried that). Should I go ahead and remove it from the download on curseforge? I realize it might be a little alarming.

sudofox commented 2 years ago

Oh, okay, that makes sense. But it would be better to just run a server jar bound to localhost in offline mode for that! Or use Pakkit in between if you want to connect to an online-mode server. I reckon it would be good to remove it from the releases to keep parity. If you're looking for some things to add in the next release, I have a few suggestions that I'll put in a different issue.

Also, bump on the gradle build thing

mega12345mega commented 2 years ago

Just uploaded the files. I'll remove the sessionchanger from the releases in a bit, should have it fixed by tonight.

sudofox commented 2 years ago

You're awesome!! Woo!!

mega12345mega commented 2 years ago

The updated file has been released. I decided to make a new version (1.2.1) instead of updating all the previous versions, as that would have been messy.