Post: Minecraft Addresses And Structs And Funcs
05-06-2018, 04:41 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I hope to add more here as I do more research.
My main goal is to keep the code clean, because most current mods for minecraft on here are a jumble of addresses and are time consuming to mess with and update.

Funcs In Eboot:

Address | Name | Return Type

1.69 addresses:
A09FCC | getGlobalVariablesStruct | GlobalVariablesStruct *

1.71 addresses:
A0979C | getGlobalVariablesStruct | GlobalVariablesStruct *


Addresses:

1.71 addresses:
#define globalVariablesStruct ((GlobalVariablesStruct *)*(int*) 0x13DC91C)
#define buttonsPressed (*(int*)0x15AAF30+0x48 ) //CInput + 0x48

1.69 addresses:
#define globalVariablesStruct ((GlobalVariablesStruct *)*(int*) 0x13FCF3C)
#define buttonsPressed (0x3000CF78 )


How to update globalVariablesStruct address in future versions (this worked to find it in 1.71):
In ida, binary search for "FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 FF FF FF FF 01 00 00 00"
That address + 0x14 is the address of the global variables struct pointer


Structs:

Note: These were made on 1.69. I haven't checked if they have changed yet.

GlobalVariablesStruct:
    
#define PAD(x,s) char unk##x[s]
#define VALID_ADDR(x) ((unsigned int)(x) > 0x10000)
struct DataFixerUpper;
struct MultiPlayerGameMode;
struct MultiPlayerLevel;
struct LevelRenderer;
struct MultiplayerLocalPlayer;
struct DataItem_ImplIiE;
struct NetworkDataStruct;

struct Vector3Special {//size 0x18
float x;
int unk1;
float y;
int unk2;
float z;
int unk3;
};

struct Vector2 {
float x,y;
};

struct NetworkDataStruct {
MultiplayerLocalPlayer *multiplayerLocalPlayer;//0x0
DataItem_ImplIiE *dataItem_ImplIiE1;//0x4
};

#pragma pack(1)
struct MultiplayerLocalPlayer {//*(int*)(*(int*)0x13FCF3C+0x34)+0x0 for quick reference in prodg, becayse this struct is very useful
void* getThisAddress() {return (void*)this;};
PAD(0,0x80);//0x0
Vector2 viewAngles;//0x80 //x has no clamp (-inf to +inf), y goes 90 to -90 (-90 being looking up, 90 being looking down (yes this is correct), 0 being forward) THIS IS MODIFYABLE AND WILL STICKAROONIE
PAD(1,0xCool Man (aka Tustin);//0x88
Vector3Special *coords;//0x90 These are desynced from server so best not to modify them
PAD(2,0x120-0x94);//0x94
NetworkDataStruct *netData;//0x120
PAD(3,0x5D8-0x124);//0x124
unsigned char flyData[4];//0x5D8
PAD(4,0xC);//0x5DC
unsigned int XP;//0x5E8
PAD(5,0x6DC-0x5EC);//0x5EC
unsigned int invisibility;//0x6DC - set to 0001F990 on, 0001F810 off
void setFly(bool enabled) {
flyData[2] = enabled;
flyData[1] = enabled;
}
bool getFly() {
return flyData[2];
}
void setInvisibility(bool enabled) {//this ain't work unless u got host priviledges on
if (enabled) {
invisibility = 0x0001F990;
} else {
invisibility = 0x0001F810;
}
}
};
#pragma pack(4)

struct GlobalVariablesStruct {
DataFixerUpper *dataFixerUpper;//0x0
MultiPlayerGameMode *multiPlayerGameMode;//0x4
PAD(0,4);//0x8
PAD(1,4);//0xC
unsigned int fov;//0x10
unsigned int width;//0x14
unsigned int fov2;//0x18 don't use this one
unsigned int width2;//0x1C don't use this onen
PAD(2,4);//0x20
PAD(3,4);//0x24
PAD(4,4);//0x28
MultiPlayerLevel *multiPlayerLevel;//0x2C
LevelRenderer *levelRenderer;//0x30
MultiplayerLocalPlayer *multiplayerLocalPlayer;//0x34 muy useful
PAD(5,4);//0x38
PAD(6,4);//0x3C
unsigned int unkWeirdNumber;//0x40
MultiplayerLocalPlayer *multiplayerLocalPlayer1;//0x44
};

struct DataItem_ImplIiE {
PAD(0,4);//0x0
PAD(1,4);//0x4
PAD(2,4);//0x8
unsigned int movementTypeBitset;//0xC
};



Random Code/Snippets:

Toggle Fly:

    
void toggleFlyMode() {
if (VALID_ADDR(globalVariablesStruct->multiplayerLocalPlayer)) {
globalVariablesStruct->multiplayerLocalPlayer->setFly(!globalVariablesStruct->multiplayerLocalPlayer->getFly());
}
}


Change Movement Bit (Elytra n stuff):

    
void toggleMovementBit(int bit, bool enabled) {//bit 9 for elytra
unsigned int og = globalVariablesStruct->multiplayerLocalPlayer->netData->dataItem_ImplIiE1->movementTypeBitset;
if (enabled) {
og |= (1<<bit);
} else {
og &= !(1<<bit);
};
globalVariablesStruct->multiplayerLocalPlayer->netData->dataItem_ImplIiE1->movementTypeBitset = og;
}


Toggle invisibility (currently not working right non-host):

    
void toggleInvisibility(bool *enabled) {
if (VALID_ADDR(globalVariablesStruct->multiplayerLocalPlayer)) {
*enabled = !*enabled;
globalVariablesStruct->multiplayerLocalPlayer->setInvisibility(*enabled);
}
}


Button Monitoring:

This address can be updated by using the netcheat joker thing to find buttons.
    
namespace buttons {
unsigned int
x = 0x1,
o = 0x2,
square = 0x4,
triangle = 0x8,
up = 0x400,
down = 0x800,
left = 0x1000,
right = 0x2000,
r1 = 0x40,
r2 = 0x400000,
r3 = 0x100,
l1 = 0x80,
l2 = 0x800000,
l3 = 0x200,
start = 0x10,
select = 0x20
;

unsigned int getMCButtons()
{
return *(unsigned int*)buttonsPressed;
}

bool IsMCButtonPressed(unsigned int button)
{
return (getMCButtons() & button) > 0;
}
}



Thanks! If you find more cool things (preferrably ones that are written well), reply with them so I can add them!
Last edited by NoRecess ; 06-03-2018 at 08:18 PM. Reason: Updated some stuff to 1.71

The following 3 users say thank you to NoRecess for this useful post:

NELUxP, Norway-_-1999, OG Trojan041
05-08-2018, 08:59 PM #2
NELUxP
Do a barrel roll!
good shit bro where did you get this?
05-09-2018, 07:32 AM #3
Originally posted by NELUxP View Post
good shit bro where did you get this?


A friend showed me the godmode (0x4244ACool Man (aka Tustin) and I was able to find it all from starting there.

The elytra I found on accident completely separate. I worked it backwards to figure out more of about how it worked. and it was in this structs too lol. There's a lot more to look at but idk what it all is! This game is definitely an interesting one to say the least.

I just saw
That code looks like some other stuff in this struct. I'll see if I can find it and update it with that too cuz I wanted to find creative mode stuff.
05-09-2018, 08:42 AM #4
Originally posted by NELUxP View Post
good shit bro where did you get this?


Okay so I did your creative mode and found something.
So there are 2 values u patch:
1. MultiplayerLocalPlayer+0x5D8 (what I use for my fly. This alone works non-host, but only the fly. If you only patch this and try to use creative stuff like infinite blocks it doesn't work)
2. ServerPlayer+0x5D8 This is server side...

Are you sure the creative mode works non-host? I don't think it does... At least not in the minigames for sure.

The following user thanked NoRecess for this useful post:

NELUxP
05-09-2018, 08:51 AM #5
NELUxP
Do a barrel roll!
but also i have got non-host fly :P
05-21-2018, 02:06 AM #6
Eddie-Lucas
< ^ > < ^ >
The addresses you find in netcheat do not all do the same thing (which I will assume you already know) so when you get the return, not all of them will pertain to what you are looking for even if they have matching bytes. Also a lot of things* in the eboot was organized by 4J Studios (I do not know why) because it was not that way before 1.57 or 1.58 so must be something to make their lives easier I assume. So if you can understand what I am getting at by telling you this then you will know what to do. Winky Winky
Two cents from a nobody.


Originally posted by NoRecess View Post
I hope to add more here as I do more research.
My main goal is to keep the code clean, because most current mods for minecraft on here are a jumble of addresses and are time consuming to mess with and update.

Funcs In Eboot:

*Must be updated for future versions*
Current version: 1.69

Address | Name | Return Type
A09FCC | getGlobalVariablesStruct | GlobalVariablesStruct *


Addresses:

*Must be updated for future versions*
Current version: 1.69

#define globalVariablesStruct ((GlobalVariablesStruct *)*(int*)0x13FCF3C)
#define buttonsPressed (0x3000CF78 )


Structs:

GlobalVariablesStruct:
    
#define PAD(x,s) char unk##x[s]
#define VALID_ADDR(x) ((unsigned int)(x) > 0x10000)
struct DataFixerUpper;
struct MultiPlayerGameMode;
struct MultiPlayerLevel;
struct LevelRenderer;
struct MultiplayerLocalPlayer;
struct DataItem_ImplIiE;
struct NetworkDataStruct;

struct Vector3Special {//size 0x18
float x;
int unk1;
float y;
int unk2;
float z;
int unk3;
};

struct Vector2 {
float x,y;
};

struct NetworkDataStruct {
MultiplayerLocalPlayer *multiplayerLocalPlayer;//0x0
DataItem_ImplIiE *dataItem_ImplIiE1;//0x4
};

#pragma pack(1)
struct MultiplayerLocalPlayer {//*(int*)(*(int*)0x13FCF3C+0x34)+0x0 for quick reference in prodg, becayse this struct is very useful
void* getThisAddress() {return (void*)this;};
PAD(0,0x80);//0x0
Vector2 viewAngles;//0x80 //x has no clamp (-inf to +inf), y goes 90 to -90 (-90 being looking up, 90 being looking down (yes this is correct), 0 being forward) THIS IS MODIFYABLE AND WILL STICKAROONIE
PAD(1,0xCool Man (aka Tustin);//0x88
Vector3Special *coords;//0x90 These are desynced from server so best not to modify them
PAD(2,0x120-0x94);//0x94
NetworkDataStruct *netData;//0x120
PAD(3,0x5D8-0x124);//0x124
unsigned char flyData[4];//0x5D8
PAD(4,0xC);//0x5DC
unsigned int XP;//0x5E8
PAD(5,0x6DC-0x5EC);//0x5EC
unsigned int invisibility;//0x6DC - set to 0001F990 on, 0001F810 off
void setFly(bool enabled) {
flyData[2] = enabled;
flyData[1] = enabled;
}
bool getFly() {
return flyData[2];
}
void setInvisibility(bool enabled) {//this ain't work unless u got host priviledges on
if (enabled) {
invisibility = 0x0001F990;
} else {
invisibility = 0x0001F810;
}
}
};
#pragma pack(4)

struct GlobalVariablesStruct {
DataFixerUpper *dataFixerUpper;//0x0
MultiPlayerGameMode *multiPlayerGameMode;//0x4
PAD(0,4);//0x8
PAD(1,4);//0xC
unsigned int fov;//0x10
unsigned int width;//0x14
unsigned int fov2;//0x18 don't use this one
unsigned int width2;//0x1C don't use this onen
PAD(2,4);//0x20
PAD(3,4);//0x24
PAD(4,4);//0x28
MultiPlayerLevel *multiPlayerLevel;//0x2C
LevelRenderer *levelRenderer;//0x30
MultiplayerLocalPlayer *multiplayerLocalPlayer;//0x34 muy useful
PAD(5,4);//0x38
PAD(6,4);//0x3C
unsigned int unkWeirdNumber;//0x40
MultiplayerLocalPlayer *multiplayerLocalPlayer1;//0x44
};

struct DataItem_ImplIiE {
PAD(0,4);//0x0
PAD(1,4);//0x4
PAD(2,4);//0x8
unsigned int movementTypeBitset;//0xC
};



Random Code/Snippets:

Toggle Fly:

    
void toggleFlyMode() {
if (VALID_ADDR(globalVariablesStruct->multiplayerLocalPlayer)) {
globalVariablesStruct->multiplayerLocalPlayer->setFly(!globalVariablesStruct->multiplayerLocalPlayer->getFly());
}
}


Change Movement Bit (Elytra n stuff):

    
void toggleMovementBit(int bit, bool enabled) {//bit 9 for elytra
unsigned int og = globalVariablesStruct->multiplayerLocalPlayer->netData->dataItem_ImplIiE1->movementTypeBitset;
if (enabled) {
og |= (1<<bit);
} else {
og &= !(1<<bit);
};
globalVariablesStruct->multiplayerLocalPlayer->netData->dataItem_ImplIiE1->movementTypeBitset = og;
}


Toggle invisibility (currently not working right non-host):

    
void toggleInvisibility(bool *enabled) {
if (VALID_ADDR(globalVariablesStruct->multiplayerLocalPlayer)) {
*enabled = !*enabled;
globalVariablesStruct->multiplayerLocalPlayer->setInvisibility(*enabled);
}
}


Button Monitoring:

This address can be updated by using the netcheat joker thing to find buttons.
    
namespace buttons {
unsigned int
x = 0x1,
o = 0x2,
square = 0x4,
triangle = 0x8,
up = 0x400,
down = 0x800,
left = 0x1000,
right = 0x2000,
r1 = 0x40,
r2 = 0x400000,
r3 = 0x100,
l1 = 0x80,
l2 = 0x800000,
l3 = 0x200,
start = 0x10,
select = 0x20
;

unsigned int getMCButtons()
{
return *(unsigned int*)buttonsPressed;
}

bool IsMCButtonPressed(unsigned int button)
{
return (getMCButtons() & button) > 0;
}
}



Thanks! If you find more cool things (preferrably ones that are written well), reply with them so I can add them!
Last edited by Eddie-Lucas ; 05-21-2018 at 02:40 AM.
05-22-2018, 06:52 AM #7
Originally posted by Lucas View Post
The addresses you find in netcheat do not all do the same thing (which I will assume you already know) so when you get the return, not all of them will pertain to what you are looking for even if they have matching bytes. Also a lot of things* in the eboot was organized by 4J Studios (I do not know why) because it was not that way before 1.57 or 1.58 so must be something to make their lives easier I assume. So if you can understand what I am getting at by telling you this then you will know what to do. Winky Winky
Two cents from a nobody.


Yea I did some research on 1.54 and I know some stuff is missing now that was in that update. There used to be a list of a bunch of functions which I beleive had to do with networking. Like there was SetHealth and some others inn strings. Anyways, they are gone now. Maybe it was part of the better together update they removed stuff idk.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo