Fix HOOKing mods
This commit is contained in:
parent
a6b01da677
commit
91ee97f005
@ -5,9 +5,11 @@
|
|||||||
#include <libreborn/libreborn.h>
|
#include <libreborn/libreborn.h>
|
||||||
#include <symbols/minecraft.h>
|
#include <symbols/minecraft.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
// Send API Command
|
// Send API Command
|
||||||
std::string chat_send_api_command(Minecraft *minecraft, std::string str);
|
std::string chat_send_api_command(Minecraft *minecraft, std::string str);
|
||||||
|
|
||||||
// Override using the HOOK() macro to provide customized chat behavior.
|
// Override using the HOOK() macro to provide customized chat behavior.
|
||||||
void chat_send_message(ServerSideNetworkHandler *server_side_network_handler, char *username, char *message);
|
void chat_send_message(ServerSideNetworkHandler *server_side_network_handler, char *username, char *message);
|
||||||
void chat_handle_packet_send(Minecraft *minecraft, ChatPacket *packet);
|
void chat_handle_packet_send(Minecraft *minecraft, ChatPacket *packet);
|
||||||
|
};
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
int compat_check_exit_requested();
|
int compat_check_exit_requested();
|
||||||
void compat_request_exit();
|
void compat_request_exit();
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
int creative_is_restricted();
|
extern "C" {
|
||||||
|
int creative_is_restricted();
|
||||||
|
}
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include <libreborn/libreborn.h>
|
#include <libreborn/libreborn.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
bool _feature_has(const char *name);
|
bool _feature_has(const char *name);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef MCPI_SERVER_MODE
|
#ifdef MCPI_SERVER_MODE
|
||||||
#define _feature_has__server_defaul_is_server_disabled(name) 0
|
#define _feature_has__server_defaul_is_server_disabled(name) 0
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
char *home_get();
|
char *home_get();
|
||||||
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <libreborn/libreborn.h>
|
#include <libreborn/libreborn.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
void run_tests();
|
void run_tests();
|
||||||
void init_version();
|
void init_version();
|
||||||
void init_compat();
|
void init_compat();
|
||||||
@ -31,4 +32,5 @@ void init_options();
|
|||||||
void init_chat();
|
void init_chat();
|
||||||
void init_bucket();
|
void init_bucket();
|
||||||
void init_cake();
|
void init_cake();
|
||||||
void init_home();
|
void init_home();
|
||||||
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <symbols/minecraft.h>
|
#include <symbols/minecraft.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
typedef void (*input_tick_function_t)(Minecraft *minecraft);
|
typedef void (*input_tick_function_t)(Minecraft *minecraft);
|
||||||
void input_run_on_tick(input_tick_function_t function);
|
void input_run_on_tick(input_tick_function_t function);
|
||||||
|
|
||||||
@ -13,3 +14,4 @@ void input_open_crafting();
|
|||||||
void input_set_is_left_click(int val);
|
void input_set_is_left_click(int val);
|
||||||
|
|
||||||
void input_set_mouse_grab_state(int state);
|
void input_set_mouse_grab_state(int state);
|
||||||
|
}
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <symbols/minecraft.h>
|
#include <symbols/minecraft.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
int32_t misc_get_real_selected_slot(Player *player);
|
int32_t misc_get_real_selected_slot(Player *player);
|
||||||
|
|
||||||
typedef void (*misc_update_function_Minecraft_t)(Minecraft *obj);
|
typedef void (*misc_update_function_Minecraft_t)(Minecraft *obj);
|
||||||
@ -23,3 +24,4 @@ typedef bool (*misc_update_function_key_press_t)(Minecraft *minecrtaft, int key)
|
|||||||
void misc_run_on_game_key_press(misc_update_function_key_press_t function); // In-Game Key Presses Only
|
void misc_run_on_game_key_press(misc_update_function_key_press_t function); // In-Game Key Presses Only
|
||||||
|
|
||||||
extern bool is_in_chat;
|
extern bool is_in_chat;
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
char *override_get_path(const char *filename);
|
char *override_get_path(const char *filename);
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
void screenshot_take(char *home);
|
void screenshot_take(char *home);
|
||||||
|
}
|
@ -2,4 +2,6 @@
|
|||||||
|
|
||||||
#include "server_properties.h"
|
#include "server_properties.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
ServerProperties &get_server_properties();
|
ServerProperties &get_server_properties();
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
void sign_key_press(char key);
|
extern "C" {
|
||||||
|
void sign_key_press(char key);
|
||||||
|
}
|
@ -2,4 +2,6 @@
|
|||||||
|
|
||||||
#include <GLES/gl.h>
|
#include <GLES/gl.h>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
void glTexSubImage2D_with_scaling(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLsizei normal_texture_width, GLsizei normal_texture_height, GLenum format, GLenum type, const void *pixels);
|
void glTexSubImage2D_with_scaling(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLsizei normal_texture_width, GLsizei normal_texture_height, GLenum format, GLenum type, const void *pixels);
|
||||||
|
}
|
@ -3,4 +3,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
void title_screen_load_splashes(std::vector<std::string> &splashes);
|
void title_screen_load_splashes(std::vector<std::string> &splashes);
|
||||||
|
}
|
@ -3,4 +3,6 @@
|
|||||||
#include <symbols/minecraft.h>
|
#include <symbols/minecraft.h>
|
||||||
|
|
||||||
extern int touch_gui;
|
extern int touch_gui;
|
||||||
|
extern "C" {
|
||||||
Button *touch_create_button(int id, std::string text);
|
Button *touch_create_button(int id, std::string text);
|
||||||
|
}
|
@ -1,3 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
char *version_get();
|
char *version_get();
|
||||||
|
}
|
@ -4,7 +4,9 @@ vtable 0x10fcf0;
|
|||||||
|
|
||||||
method void saveLevelData() = 0xa2e94;
|
method void saveLevelData() = 0xa2e94;
|
||||||
method void setTile(int x, int y, int z, int id) = 0xa3904;
|
method void setTile(int x, int y, int z, int id) = 0xa3904;
|
||||||
|
method void setTileNoUpdate(int x, int y, int z, int id) = 0xa342c;
|
||||||
method void setData(int x, int y, int z, int data) = 0xa394c;
|
method void setData(int x, int y, int z, int data) = 0xa394c;
|
||||||
|
method void setDataNoUpdate(int x, int y, int z, int data) = 0xa3480;
|
||||||
method void setTileAndData(int x, int y, int z, int id, int data) = 0xa38b4;
|
method void setTileAndData(int x, int y, int z, int id, int data) = 0xa38b4;
|
||||||
method void setTileAndDataNoUpdate(int x, int y, int z, int id, int data) = 0xa33d0;
|
method void setTileAndDataNoUpdate(int x, int y, int z, int id, int data) = 0xa33d0;
|
||||||
// Calls setTileDirty and updateNearbyTiles
|
// Calls setTileDirty and updateNearbyTiles
|
||||||
@ -56,5 +58,6 @@ property std::vector<Entity *> entities = 0x20;
|
|||||||
property std::vector<TileEntity *> tileentities = 0x50;
|
property std::vector<TileEntity *> tileentities = 0x50;
|
||||||
property std::vector<Player *> players = 0x60;
|
property std::vector<Player *> players = 0x60;
|
||||||
property Dimension *dimension = 0x74;
|
property Dimension *dimension = 0x74;
|
||||||
property ChunkSource *chunk_source = 0xa5c;
|
|
||||||
property bool no_update = 0x70;
|
property bool no_update = 0x70;
|
||||||
|
property ChunkSource *chunk_source = 0xa5c;
|
||||||
|
property LevelData data = 0xa64;
|
||||||
|
@ -1 +1,5 @@
|
|||||||
|
method int getTime() = 0xba970;
|
||||||
|
method void setTime(int time) = 0xbab28;
|
||||||
method bool getSpawnMobs() = 0xbabec;
|
method bool getSpawnMobs() = 0xbabec;
|
||||||
|
|
||||||
|
property int time = 0x68;
|
||||||
|
Loading…
Reference in New Issue
Block a user