Skip to content

Commit 7bee477

Browse files
Add hook for modloader (#117)
1 parent 7074f35 commit 7bee477

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Minecraft.Client/Minecraft.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ int QuickSelectBoxWidth[3]=
105105
};
106106
#endif
107107

108+
extern "C" __declspec(dllexport) Minecraft* GetGameInstance()
109+
{
110+
return Minecraft::m_instance;
111+
}
112+
108113
Minecraft::Minecraft(Component *mouseComponent, Canvas *parent, MinecraftApplet *minecraftApplet, int width, int height, bool fullscreen)
109114
{
110115
// 4J - added this block of initialisers

Minecraft.Client/Minecraft.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ class Minecraft
6060
// void crash(CrashReport crash);
6161
// public abstract void onCrash(CrashReport crash);
6262

63-
private:
6463
static Minecraft *m_instance;
6564

66-
public:
6765
MultiPlayerGameMode *gameMode;
6866

6967
private:

0 commit comments

Comments
 (0)