References! References Everywhere!

This commit is contained in:
TheBrokenRail 2024-07-15 03:05:05 -04:00
parent 0521b540fd
commit 88f59d951a
78 changed files with 181 additions and 181 deletions

@ -1 +1 @@
Subproject commit 346d4403df854a03e0cce15d26519a8700014615 Subproject commit 46c486e56a15334ccc4bd52bcc9ab1bfbcb7d27e

View File

@ -7,7 +7,7 @@
extern "C" { 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(const Minecraft *minecraft, const 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);

View File

@ -7,7 +7,7 @@
#include <mods/init/init.h> #include <mods/init/init.h>
// Fix Grass And Leaves Inventory Rendering When The gui_blocks Atlas Is Disabled // Fix Grass And Leaves Inventory Rendering When The gui_blocks Atlas Is Disabled
static void ItemRenderer_renderGuiItemCorrect_injection(ItemRenderer_renderGuiItemCorrect_t original, Font *font, Textures *textures, ItemInstance *item_instance, int32_t param_1, int32_t param_2) { static void ItemRenderer_renderGuiItemCorrect_injection(ItemRenderer_renderGuiItemCorrect_t original, Font *font, Textures *textures, const ItemInstance *item_instance, int32_t param_1, int32_t param_2) {
int32_t leaves_id = Tile::leaves->id; int32_t leaves_id = Tile::leaves->id;
int32_t grass_id = Tile::grass->id; int32_t grass_id = Tile::grass->id;
// Replace Rendered Item With Carried Variant // Replace Rendered Item With Carried Variant
@ -74,7 +74,7 @@ static void InventoryPane_renderBatch_Tesselator_color_injection(Tesselator *tes
// Enable Item Color Fix // Enable Item Color Fix
item_color_fix_mode = 2; item_color_fix_mode = 2;
} }
static void ItemRenderer_renderGuiItem_two_injection(ItemRenderer_renderGuiItem_two_t original, Font *font, Textures *textures, ItemInstance *item_instance, float param_1, float param_2, float param_3, float param_4, bool param_5) { static void ItemRenderer_renderGuiItem_two_injection(ItemRenderer_renderGuiItem_two_t original, Font *font, Textures *textures, const ItemInstance *item_instance, float param_1, float param_2, float param_3, float param_4, bool param_5) {
// Call Original Method // Call Original Method
original(font, textures, item_instance, param_1, param_2, param_3, param_4, param_5); original(font, textures, item_instance, param_1, param_2, param_3, param_4, param_5);

View File

@ -34,10 +34,10 @@ static void start_world(Minecraft *minecraft) {
// Delete World If It Already Exists // Delete World If It Already Exists
LevelStorageSource *level_source = minecraft->getLevelSource(); LevelStorageSource *level_source = minecraft->getLevelSource();
std::string name = BENCHMARK_WORLD_NAME; std::string name = BENCHMARK_WORLD_NAME;
level_source->deleteLevel(&name); level_source->deleteLevel(name);
// Select Level // Select Level
minecraft->selectLevel(&name, &name, &settings); minecraft->selectLevel(name, name, settings);
// Open ProgressScreen // Open ProgressScreen
ProgressScreen *screen = new ProgressScreen; ProgressScreen *screen = new ProgressScreen;

View File

@ -10,7 +10,7 @@
static FoodItem *bucket = nullptr; static FoodItem *bucket = nullptr;
// Description And Texture // Description And Texture
static std::string BucketItem_getDescriptionId(__attribute__((unused)) FoodItem *item, ItemInstance *item_instance) { static std::string BucketItem_getDescriptionId(__attribute__((unused)) FoodItem *item, const ItemInstance *item_instance) {
if (item_instance->auxiliary == Tile::water->id) { if (item_instance->auxiliary == Tile::water->id) {
return "item.bucketWater"; return "item.bucketWater";
} else if (item_instance->auxiliary == Tile::lava->id) { } else if (item_instance->auxiliary == Tile::lava->id) {
@ -195,8 +195,8 @@ static FoodItem *create_bucket(int32_t id, int32_t texture_x, int32_t texture_y,
// Setup // Setup
item->setIcon(texture_x, texture_y); item->setIcon(texture_x, texture_y);
item->setDescriptionId(&name); item->setDescriptionId(name);
item->is_stacked_by_data = 1; item->is_stacked_by_data = true;
item->category = 2; item->category = 2;
item->max_damage = 0; item->max_damage = 0;
item->max_stack_size = 1; item->max_stack_size = 1;
@ -249,9 +249,9 @@ static void Inventory_setupDefault_FillingContainer_addItem_call_injection(Filli
// Make Liquids Selectable // Make Liquids Selectable
static bool is_holding_bucket = false; static bool is_holding_bucket = false;
static HitResult Mob_pick_Level_clip_injection(Level *level, unsigned char *param_1, unsigned char *param_2, __attribute__((unused)) bool clip_liquids, bool param_3) { static HitResult Mob_pick_Level_clip_injection(Level *level, const Vec3 &param_1, const Vec3 &param_2, __attribute__((unused)) bool clip_liquids, bool clip_hitboxes) {
// Call Original Method // Call Original Method
return level->clip(param_1, param_2, is_holding_bucket, param_3); return level->clip(param_1, param_2, is_holding_bucket, clip_hitboxes);
} }
static void handle_tick(Minecraft *minecraft) { static void handle_tick(Minecraft *minecraft) {
LocalPlayer *player = minecraft->player; LocalPlayer *player = minecraft->player;
@ -315,12 +315,12 @@ static void Recipes_injection(Recipes *recipes) {
std::string line1 = "# #"; std::string line1 = "# #";
std::string line2 = " # "; std::string line2 = " # ";
std::vector<Recipes_Type> types = {type1}; std::vector<Recipes_Type> types = {type1};
recipes->addShapedRecipe_2(&result, &line1, &line2, &types); recipes->addShapedRecipe_2(result, line1, line2, types);
} }
// Custom Furnace Fuel // Custom Furnace Fuel
static int32_t FurnaceTileEntity_getBurnDuration_injection(FurnaceTileEntity_getBurnDuration_t original, ItemInstance *item_instance) { static int32_t FurnaceTileEntity_getBurnDuration_injection(FurnaceTileEntity_getBurnDuration_t original, const ItemInstance &item_instance) {
if (item_instance->count > 0 && item_instance->id == bucket->id && item_instance->auxiliary == Tile::lava->id) { if (item_instance.count > 0 && item_instance.id == bucket->id && item_instance.auxiliary == Tile::lava->id) {
return 20000; return 20000;
} else { } else {
// Call Original Method // Call Original Method

View File

@ -150,7 +150,7 @@ static void make_cake() {
cake->setExplodeable(20.0f); cake->setExplodeable(20.0f);
cake->category = 4; cake->category = 4;
std::string name = "Cake"; std::string name = "Cake";
cake->setDescriptionId(&name); cake->setDescriptionId(name);
} }
static void Tile_initTiles_injection() { static void Tile_initTiles_injection() {
@ -223,8 +223,8 @@ static void Recipes_injection(Recipes *recipes) {
std::string line1 = "mmm"; std::string line1 = "mmm";
std::string line2 = "ses"; std::string line2 = "ses";
std::string line3 = "www"; std::string line3 = "www";
std::vector<Recipes_Type> ingredients = {milk, sugar, wheat, eggs}; std::vector ingredients = {milk, sugar, wheat, eggs};
recipes->addShapedRecipe_3(&cake_item, &line1, &line2, &line3, &ingredients); recipes->addShapedRecipe_3(cake_item, line1, line2, line3, ingredients);
} }
void init_cake() { void init_cake() {

View File

@ -6,7 +6,7 @@
#include <mods/init/init.h> #include <mods/init/init.h>
// Take Screenshot Using TripodCamera // Take Screenshot Using TripodCamera
static void AppPlatform_saveScreenshot_injection(__attribute__((unused)) AppPlatform_saveScreenshot_t original, __attribute__((unused)) AppPlatform *app_platform, __attribute__((unused)) std::string *path, __attribute__((unused)) int32_t width, __attribute__((unused)) int32_t height) { static void AppPlatform_saveScreenshot_injection(__attribute__((unused)) AppPlatform_saveScreenshot_t original, __attribute__((unused)) AppPlatform *app_platform, __attribute__((unused)) const std::string &path, __attribute__((unused)) int32_t width, __attribute__((unused)) int32_t height) {
screenshot_take(nullptr); screenshot_take(nullptr);
} }
@ -25,7 +25,7 @@ static EntityRenderDispatcher *EntityRenderDispatcher_injection(EntityRenderDisp
} }
// Display Smoke From TripodCamera Higher // Display Smoke From TripodCamera Higher
static void TripodCamera_tick_Level_addParticle_call_injection(Level *level, std::string *particle, float x, float y, float z, float deltaX, float deltaY, float deltaZ, int count) { static void TripodCamera_tick_Level_addParticle_call_injection(Level *level, const std::string &particle, float x, float y, float z, float deltaX, float deltaY, float deltaZ, int count) {
// Call Original Method // Call Original Method
level->addParticle(particle, x, y + 0.5, z, deltaX, deltaY, deltaZ, count); level->addParticle(particle, x, y + 0.5, z, deltaX, deltaY, deltaZ, count);
} }

View File

@ -1,7 +1,6 @@
#include <string> #include <string>
#include <cstring> #include <cstring>
#include <cstdio> #include <cstdio>
#include <vector>
#include <libreborn/libreborn.h> #include <libreborn/libreborn.h>
#include <symbols/minecraft.h> #include <symbols/minecraft.h>
@ -12,14 +11,14 @@
#include <mods/chat/chat.h> #include <mods/chat/chat.h>
// Send API Command // Send API Command
std::string chat_send_api_command(Minecraft *minecraft, std::string str) { std::string chat_send_api_command(const Minecraft *minecraft, const std::string &str) {
ConnectedClient client; ConnectedClient client;
client.sock = -1; client.sock = -1;
client.str = ""; client.str = "";
client.time = 0; client.time = 0;
CommandServer *command_server = minecraft->command_server; CommandServer *command_server = minecraft->command_server;
if (command_server != nullptr) { if (command_server != nullptr) {
return command_server->parse(&client, &str); return command_server->parse(client, str);
} else { } else {
return ""; return "";
} }
@ -42,7 +41,7 @@ void chat_send_message(ServerSideNetworkHandler *server_side_network_handler, ch
sanitize_string(raw_str, MAX_CHAT_MESSAGE_LENGTH, 0); sanitize_string(raw_str, MAX_CHAT_MESSAGE_LENGTH, 0);
full_message = raw_str; full_message = raw_str;
free(raw_str); free(raw_str);
server_side_network_handler->displayGameMessage(&full_message); server_side_network_handler->displayGameMessage(full_message);
} }
// Handle Chat packet Send // Handle Chat packet Send
void chat_handle_packet_send(Minecraft *minecraft, ChatPacket *packet) { void chat_handle_packet_send(Minecraft *minecraft, ChatPacket *packet) {
@ -54,7 +53,7 @@ void chat_handle_packet_send(Minecraft *minecraft, ChatPacket *packet) {
chat_send_message(server_side_network_handler, Strings::default_username, (char *) message); chat_send_message(server_side_network_handler, Strings::default_username, (char *) message);
} else { } else {
// Client // Client
rak_net_instance->send((Packet *) packet); rak_net_instance->send(*(Packet *) packet);
} }
} }
@ -67,7 +66,7 @@ static void CommandServer_parse_CommandServer_dispatchPacket_injection(CommandSe
} }
// Handle ChatPacket Server-Side // Handle ChatPacket Server-Side
static void ServerSideNetworkHandler_handle_ChatPacket_injection(ServerSideNetworkHandler *server_side_network_handler, RakNet_RakNetGUID *rak_net_guid, ChatPacket *chat_packet) { static void ServerSideNetworkHandler_handle_ChatPacket_injection(ServerSideNetworkHandler *server_side_network_handler, const RakNet_RakNetGUID &rak_net_guid, ChatPacket *chat_packet) {
Player *player = server_side_network_handler->getPlayer(rak_net_guid); Player *player = server_side_network_handler->getPlayer(rak_net_guid);
if (player != nullptr) { if (player != nullptr) {
const char *username = player->username.c_str(); const char *username = player->username.c_str();

View File

@ -84,7 +84,7 @@ static void Player_die_injection(std::function<void(ParentSelf *, Entity *)> ori
// Post Death Message // Post Death Message
ServerSideNetworkHandler *server_side_network_handler = (ServerSideNetworkHandler *) player->minecraft->network_handler; ServerSideNetworkHandler *server_side_network_handler = (ServerSideNetworkHandler *) player->minecraft->network_handler;
server_side_network_handler->displayGameMessage(&message); server_side_network_handler->displayGameMessage(message);
} }
} }
template <typename Self> template <typename Self>
@ -112,7 +112,7 @@ static void Player_actuallyHurt_injection(Self *player, int32_t damage) {
// Post Death Message // Post Death Message
ServerSideNetworkHandler *server_side_network_handler = (ServerSideNetworkHandler *) player->minecraft->network_handler; ServerSideNetworkHandler *server_side_network_handler = (ServerSideNetworkHandler *) player->minecraft->network_handler;
server_side_network_handler->displayGameMessage(&message); server_side_network_handler->displayGameMessage(message);
} }
} }
} }

View File

@ -31,7 +31,7 @@ static std::vector<std::string> get_debug_info(const Minecraft *minecraft) {
float x = minecraft->player->x; float x = minecraft->player->x;
float y = minecraft->player->y - minecraft->player->height_offset; float y = minecraft->player->y - minecraft->player->height_offset;
float z = minecraft->player->z; float z = minecraft->player->z;
minecraft->command_server->pos_translator.to(&x, &y, &z); minecraft->command_server->pos_translator.to(x, y, z);
info.push_back("X: " + to_string_with_precision(x, debug_precision)); info.push_back("X: " + to_string_with_precision(x, debug_precision));
info.push_back("Y: " + to_string_with_precision(y, debug_precision)); info.push_back("Y: " + to_string_with_precision(y, debug_precision));
info.push_back("Z: " + to_string_with_precision(z, debug_precision)); info.push_back("Z: " + to_string_with_precision(z, debug_precision));
@ -47,13 +47,13 @@ static int debug_background_padding = 1;
static int line_height = 8; static int line_height = 8;
static void render_debug_line(Gui *gui, std::string &line, const int x, const int y) { static void render_debug_line(Gui *gui, std::string &line, const int x, const int y) {
// Draw Background // Draw Background
int width = gui->minecraft->font->width(&line); int width = gui->minecraft->font->width(line);
if (width == 0) { if (width == 0) {
return; return;
} }
gui->fill(x - debug_background_padding, y - debug_background_padding, x + width + debug_background_padding, y + line_height, debug_background_color); gui->fill(x - debug_background_padding, y - debug_background_padding, x + width + debug_background_padding, y + line_height, debug_background_color);
// Draw Text // Draw Text
gui->minecraft->font->draw(&line, float(x), float(y), debug_text_color); gui->minecraft->font->draw(line, float(x), float(y), debug_text_color);
} }
// Draw Debug Information // Draw Debug Information
static bool debug_info_shown = false; static bool debug_info_shown = false;

View File

@ -86,12 +86,12 @@ CUSTOM_VTABLE(create_world_screen, Screen) {
original_render(super, x, y, param_1); original_render(super, x, y, param_1);
// Title // Title
std::string title = "Create world"; std::string title = "Create world";
super->drawCenteredString(super->font, &title, super->width / 2, title_padding, 0xffffffff); super->drawCenteredString(super->font, title, super->width / 2, title_padding, 0xffffffff);
// Game Mode Description // Game Mode Description
CreateWorldScreen *self = (CreateWorldScreen *) super; CreateWorldScreen *self = (CreateWorldScreen *) super;
bool is_creative = self->game_mode->text == CREATIVE_STR; bool is_creative = self->game_mode->text == CREATIVE_STR;
std::string description = is_creative ? Strings::creative_mode_description : Strings::survival_mode_description; std::string description = is_creative ? Strings::creative_mode_description : Strings::survival_mode_description;
super->drawString(super->font, &description, self->game_mode->x, self->game_mode->y + self->game_mode->height + description_padding, 0xa0a0a0); super->drawString(super->font, description, self->game_mode->x, self->game_mode->y + self->game_mode->height + description_padding, 0xa0a0a0);
}; };
// Positioning // Positioning
static Screen_setupPositions_t original_setupPositions = vtable->setupPositions; static Screen_setupPositions_t original_setupPositions = vtable->setupPositions;
@ -164,7 +164,7 @@ static Screen *create_create_world_screen() {
static std::string getUniqueLevelName(LevelStorageSource *source, const std::string &in) { static std::string getUniqueLevelName(LevelStorageSource *source, const std::string &in) {
std::set<std::string> maps; std::set<std::string> maps;
std::vector<LevelSummary> vls; std::vector<LevelSummary> vls;
source->getLevelList(&vls); source->getLevelList(vls);
for (int i = 0; i < int(vls.size()); i++) { for (int i = 0; i < int(vls.size()); i++) {
const LevelSummary &ls = vls[i]; const LevelSummary &ls = vls[i];
maps.insert(ls.folder); maps.insert(ls.folder);
@ -179,13 +179,13 @@ static std::string getUniqueLevelName(LevelStorageSource *source, const std::str
// Create World // Create World
int get_seed_from_string(std::string str) { int get_seed_from_string(std::string str) {
int seed; int seed;
str = Util::stringTrim(&str); str = Util::stringTrim(str);
if (!str.empty()) { if (!str.empty()) {
int num; int num;
if (sscanf(str.c_str(), "%d", &num) > 0) { if (sscanf(str.c_str(), "%d", &num) > 0) {
seed = num; seed = num;
} else { } else {
seed = Util::hashCode(&str); seed = Util::hashCode(str);
} }
} else { } else {
seed = Common::getEpochTimeS(); seed = Common::getEpochTimeS();
@ -197,7 +197,7 @@ static void create_world(Minecraft *minecraft, std::string name, bool is_creativ
int seed = get_seed_from_string(std::move(seed_str)); int seed = get_seed_from_string(std::move(seed_str));
// Get Folder Name // Get Folder Name
name = Util::stringTrim(&name); name = Util::stringTrim(name);
std::string folder = ""; std::string folder = "";
for (char c : name) { for (char c : name) {
if ( if (
@ -227,7 +227,7 @@ static void create_world(Minecraft *minecraft, std::string name, bool is_creativ
settings.seed = seed; settings.seed = seed;
// Create World // Create World
minecraft->selectLevel(&folder, &name, &settings); minecraft->selectLevel(folder, name, settings);
// Multiplayer // Multiplayer
minecraft->hostMultiplayer(19132); minecraft->hostMultiplayer(19132);

View File

@ -114,8 +114,7 @@ void misc_run_on_key_press(const std::function<bool(Minecraft *, int)> &func) {
void misc_render_background(int color, Minecraft *minecraft, int x, int y, int width, int height) { void misc_render_background(int color, Minecraft *minecraft, int x, int y, int width, int height) {
// https://github.com/ReMinecraftPE/mcpe/blob/f0d65eaecec1b3fe9c2f2b251e114a890c54ab77/source/client/gui/components/RolledSelectionList.cpp#L169-L179 // https://github.com/ReMinecraftPE/mcpe/blob/f0d65eaecec1b3fe9c2f2b251e114a890c54ab77/source/client/gui/components/RolledSelectionList.cpp#L169-L179
glColor4f(1, 1, 1, 1); glColor4f(1, 1, 1, 1);
std::string texture = "gui/background.png"; minecraft->textures->loadAndBindTexture("gui/background.png");
minecraft->textures->loadAndBindTexture(&texture);
Tesselator *t = &Tesselator::instance; Tesselator *t = &Tesselator::instance;
t->begin(7); t->begin(7);
t->color(color, color, color, 255); t->color(color, color, color, 255);

View File

@ -8,9 +8,9 @@
// Print Chat To Log // Print Chat To Log
static bool Gui_addMessage_recursing = false; static bool Gui_addMessage_recursing = false;
static void Gui_addMessage_injection(Gui_addMessage_t original, Gui *gui, std::string *text) { static void Gui_addMessage_injection(Gui_addMessage_t original, Gui *gui, const std::string &text) {
// Sanitize Message // Sanitize Message
char *new_message = strdup(text->c_str()); char *new_message = strdup(text.c_str());
ALLOC_CHECK(new_message); ALLOC_CHECK(new_message);
sanitize_string(new_message, -1, 1); sanitize_string(new_message, -1, 1);
std::string cpp_str = new_message; std::string cpp_str = new_message;
@ -26,13 +26,13 @@ static void Gui_addMessage_injection(Gui_addMessage_t original, Gui *gui, std::s
free(safe_message); free(safe_message);
// Call Original Method // Call Original Method
original(gui, &cpp_str); original(gui, cpp_str);
// End Recursing // End Recursing
Gui_addMessage_recursing = false; Gui_addMessage_recursing = false;
} else { } else {
// Call Original Method // Call Original Method
original(gui, &cpp_str); original(gui, cpp_str);
} }
// Free // Free

View File

@ -286,7 +286,7 @@ static void LocalPlayer_die_injection(LocalPlayer_die_t original, LocalPlayer *e
} }
// Fix Furnace Not Checking Item Auxiliary When Inserting New Item // Fix Furnace Not Checking Item Auxiliary When Inserting New Item
static int32_t FurnaceScreen_handleAddItem_injection(FurnaceScreen_handleAddItem_t original, FurnaceScreen *furnace_screen, int32_t slot, ItemInstance *item) { static int32_t FurnaceScreen_handleAddItem_injection(FurnaceScreen_handleAddItem_t original, FurnaceScreen *furnace_screen, int32_t slot, const ItemInstance *item) {
// Get Existing Item // Get Existing Item
FurnaceTileEntity *tile_entity = furnace_screen->tile_entity; FurnaceTileEntity *tile_entity = furnace_screen->tile_entity;
ItemInstance *existing_item = tile_entity->getItem(slot); ItemInstance *existing_item = tile_entity->getItem(slot);
@ -611,9 +611,9 @@ static void Dimension_updateLightRamp_injection(__attribute__((unused)) Dimensio
} }
// Read Asset File // Read Asset File
static AppPlatform_readAssetFile_return_value AppPlatform_readAssetFile_injection(__attribute__((unused)) AppPlatform_readAssetFile_t original, __attribute__((unused)) AppPlatform *app_platform, std::string *path) { static AppPlatform_readAssetFile_return_value AppPlatform_readAssetFile_injection(__attribute__((unused)) AppPlatform_readAssetFile_t original, __attribute__((unused)) AppPlatform *app_platform, const std::string &path) {
// Open File // Open File
std::ifstream stream("data/" + *path, std::ios_base::binary | std::ios_base::ate); std::ifstream stream("data/" + path, std::ios_base::binary | std::ios_base::ate);
if (!stream) { if (!stream) {
// Does Not Exist // Does Not Exist
AppPlatform_readAssetFile_return_value ret; AppPlatform_readAssetFile_return_value ret;
@ -899,7 +899,7 @@ void init_misc() {
// Replace Block Highlight With Outline // Replace Block Highlight With Outline
if (feature_has("Replace Block Highlight With Outline", server_disabled)) { if (feature_has("Replace Block Highlight With Outline", server_disabled)) {
overwrite_calls(LevelRenderer_renderHitSelect, [](__attribute__((unused)) LevelRenderer_renderHitSelect_t original, LevelRenderer *self, Player *player, HitResult *hit_result, int i, void *vp, float f) { overwrite_calls(LevelRenderer_renderHitSelect, [](__attribute__((unused)) LevelRenderer_renderHitSelect_t original, LevelRenderer *self, Player *player, const HitResult &hit_result, int i, void *vp, float f) {
self->renderHitOutline(player, hit_result, i, vp, f); self->renderHitOutline(player, hit_result, i, vp, f);
}); });
unsigned char fix_outline_patch[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop" unsigned char fix_outline_patch[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop"
@ -983,7 +983,7 @@ void init_misc() {
if (reborn_is_headless()) { if (reborn_is_headless()) {
overwrite_calls(GameRenderer_render, nop<GameRenderer_render_t, GameRenderer *, float>); overwrite_calls(GameRenderer_render, nop<GameRenderer_render_t, GameRenderer *, float>);
overwrite_calls(NinecraftApp_initGLStates, nop<NinecraftApp_initGLStates_t, NinecraftApp *>); overwrite_calls(NinecraftApp_initGLStates, nop<NinecraftApp_initGLStates_t, NinecraftApp *>);
overwrite_calls(Gui_onConfigChanged, nop<Gui_onConfigChanged_t, Gui *, Config *>); overwrite_calls(Gui_onConfigChanged, nop<Gui_onConfigChanged_t, Gui *, const Config &>);
overwrite_calls(LevelRenderer_generateSky, nop<LevelRenderer_generateSky_t, LevelRenderer *>); overwrite_calls(LevelRenderer_generateSky, nop<LevelRenderer_generateSky_t, LevelRenderer *>);
} }
} }

View File

@ -101,7 +101,7 @@ static void position_info(Font *font, int width, int height) {
int info_text_width = 0; int info_text_width = 0;
for (int i = 0; i < info_size; i++) { for (int i = 0; i < info_size; i++) {
std::string text = info[i].get_text(); std::string text = info[i].get_text();
int text_width = font->width(&text); int text_width = font->width(text);
if (text_width > info_text_width) { if (text_width > info_text_width) {
info_text_width = text_width; info_text_width = text_width;
} }
@ -127,7 +127,7 @@ static void position_info(Font *font, int width, int height) {
// Third Stage (Find Line Button Width) // Third Stage (Find Line Button Width)
line_button_width = 0; line_button_width = 0;
for (int i = 0; i < info_size; i++) { for (int i = 0; i < info_size; i++) {
int text_width = font->width(&info[i].button_text); int text_width = font->width(info[i].button_text);
if (text_width > line_button_width) { if (text_width > line_button_width) {
line_button_width = text_width; line_button_width = text_width;
} }
@ -205,11 +205,11 @@ CUSTOM_VTABLE(info_screen, Screen) {
original_render(self, x, y, param_1); original_render(self, x, y, param_1);
// Title // Title
std::string title = "Reborn Information"; std::string title = "Reborn Information";
self->drawCenteredString(self->font, &title, self->width / 2, title_padding, 0xffffffff); self->drawCenteredString(self->font, title, self->width / 2, title_padding, 0xffffffff);
// Info Text // Info Text
for (int i = 0; i < info_size; i++) { for (int i = 0; i < info_size; i++) {
std::string text = info[i].get_text(); std::string text = info[i].get_text();
self->drawString(self->font, &text, positioned_info[i].text.x, positioned_info[i].text.y, 0xffffffff); self->drawString(self->font, text, positioned_info[i].text.x, positioned_info[i].text.y, 0xffffffff);
} }
}; };
// Positioning // Positioning

View File

@ -100,7 +100,7 @@ static void OptionsScreen_init_injection(OptionsScreen_init_t original, OptionsS
Touch_TButton *button = new Touch_TButton; Touch_TButton *button = new Touch_TButton;
ALLOC_CHECK(button); ALLOC_CHECK(button);
std::string name = "Reborn"; std::string name = "Reborn";
button->constructor(INFO_BUTTON_ID, &name); button->constructor(INFO_BUTTON_ID, name);
self->rendered_buttons.push_back((Button *) button); self->rendered_buttons.push_back((Button *) button);
self->selectable_buttons.push_back((Button *) button); self->selectable_buttons.push_back((Button *) button);
} }

View File

@ -95,7 +95,7 @@ void screenshot_take(Gui *gui) {
if (gui) { if (gui) {
std::string chat_msg = "Saved screenshot as "; std::string chat_msg = "Saved screenshot as ";
chat_msg += filename; chat_msg += filename;
gui->addMessage(&chat_msg); gui->addMessage(chat_msg);
} }
} }

View File

@ -77,7 +77,7 @@ static void start_world(Minecraft *minecraft) {
settings.seed = seed; settings.seed = seed;
// Select Level // Select Level
minecraft->selectLevel(&world_name, &world_name, &settings); minecraft->selectLevel(world_name, world_name, settings);
// Don't Open Port When Using --only-generate // Don't Open Port When Using --only-generate
if (!only_generate) { if (!only_generate) {
@ -304,7 +304,7 @@ static void handle_commands(Minecraft *minecraft) {
char *safe_message = to_cp437(message.c_str()); char *safe_message = to_cp437(message.c_str());
std::string cpp_string = safe_message; std::string cpp_string = safe_message;
// Post Message To Chat // Post Message To Chat
server_side_network_handler->displayGameMessage(&cpp_string); server_side_network_handler->displayGameMessage(cpp_string);
// Free // Free
free(safe_message); free(safe_message);
} else if (data == list_command) { } else if (data == list_command) {
@ -409,7 +409,7 @@ static bool RakNet_RakPeer_IsBanned_injection(__attribute__((unused)) RakNet_Rak
} }
// Log IPs // Log IPs
static Player *ServerSideNetworkHandler_onReady_ClientGeneration_ServerSideNetworkHandler_popPendingPlayer_injection(ServerSideNetworkHandler *server_side_network_handler, RakNet_RakNetGUID *guid) { static Player *ServerSideNetworkHandler_onReady_ClientGeneration_ServerSideNetworkHandler_popPendingPlayer_injection(ServerSideNetworkHandler *server_side_network_handler, const RakNet_RakNetGUID &guid) {
// Call Original Method // Call Original Method
Player *player = server_side_network_handler->popPendingPlayer(guid); Player *player = server_side_network_handler->popPendingPlayer(guid);
@ -419,7 +419,7 @@ static Player *ServerSideNetworkHandler_onReady_ClientGeneration_ServerSideNetwo
std::string *username = &player->username; std::string *username = &player->username;
Minecraft *minecraft = server_side_network_handler->minecraft; Minecraft *minecraft = server_side_network_handler->minecraft;
RakNet_RakPeer *rak_peer = get_rak_peer(minecraft); RakNet_RakPeer *rak_peer = get_rak_peer(minecraft);
char *ip = get_rak_net_guid_ip(rak_peer, *guid); char *ip = get_rak_net_guid_ip(rak_peer, guid);
// Log // Log
INFO("%s Has Joined (IP: %s)", username->c_str(), ip); INFO("%s Has Joined (IP: %s)", username->c_str(), ip);

View File

@ -114,14 +114,14 @@ static void *loader_thread(void *user_data) {
} }
// Intercept Texture Creation // Intercept Texture Creation
static int32_t Textures_assignTexture_injection(Textures_assignTexture_t original, Textures *textures, std::string *name, unsigned char *data) { static int32_t Textures_assignTexture_injection(Textures_assignTexture_t original, Textures *textures, const std::string &name, unsigned char *data) {
// Call Original Method // Call Original Method
int32_t id = original(textures, name, data); int32_t id = original(textures, name, data);
// Load Skin // Load Skin
if (starts_with(name->c_str(), "$")) { if (starts_with(name.c_str(), "$")) {
loader_data *user_data = new loader_data; loader_data *user_data = new loader_data;
user_data->name = name->substr(1); user_data->name = name.substr(1);
DEBUG("Loading Skin: %s", user_data->name.c_str()); DEBUG("Loading Skin: %s", user_data->name.c_str());
user_data->texture_id = id; user_data->texture_id = id;
// Start Thread // Start Thread

View File

@ -6,7 +6,7 @@
#include "skin-internal.h" #include "skin-internal.h"
// Base64 Encode (https://gist.github.com/tomykaira/f0fd86b6c73063283afe550bc5d77594) // Base64 Encode (https://gist.github.com/tomykaira/f0fd86b6c73063283afe550bc5d77594)
static std::string base64_encode(const std::string data) { static std::string base64_encode(const std::string &data) {
static constexpr char encoding_table[] = { static constexpr char encoding_table[] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
@ -74,7 +74,7 @@ static int32_t Textures_loadAndBindTexture_injection(Textures *textures, __attri
} }
// Call Original Method // Call Original Method
return textures->loadAndBindTexture(&new_texture); return textures->loadAndBindTexture(new_texture);
} }
// Init // Init

View File

@ -353,8 +353,8 @@ __attribute__((constructor)) static void init_rand_seed() {
srand(time(nullptr)); srand(time(nullptr));
} }
// Pick Sound // Pick Sound
std::string _sound_pick(std::string sound) { std::string _sound_pick(const std::string &sound) {
if (sound_repository.count(sound) > 0) { if (sound_repository.contains(sound)) {
// Sound Exists // Sound Exists
std::vector<std::string> &options = sound_repository[sound]; std::vector<std::string> &options = sound_repository[sound];
return options[rand() % options.size()]; return options[rand() % options.size()];
@ -367,8 +367,8 @@ std::string _sound_pick(std::string sound) {
// Resolve All Sounds // Resolve All Sounds
void _sound_resolve_all() { void _sound_resolve_all() {
std::string source = _sound_get_source_file(); const std::string source = _sound_get_source_file();
if (source.size() > 0) { if (!source.empty()) {
for (auto &it : sound_repository) { for (auto &it : sound_repository) {
for (std::string &name : it.second) { for (std::string &name : it.second) {
// Zero Volume Prevents An OpenAL Source From Being Allocated While Still Resolving The Sound // Zero Volume Prevents An OpenAL Source From Being Allocated While Still Resolving The Sound

View File

@ -4,4 +4,4 @@
__attribute__((visibility("internal"))) std::string _sound_get_source_file(); __attribute__((visibility("internal"))) std::string _sound_get_source_file();
__attribute__((visibility("internal"))) void _sound_resolve_all(); __attribute__((visibility("internal"))) void _sound_resolve_all();
__attribute__((visibility("internal"))) std::string _sound_pick(std::string sound); __attribute__((visibility("internal"))) std::string _sound_pick(const std::string &sound);

View File

@ -69,11 +69,11 @@ static void play(std::string name, float x, float y, float z, float volume, floa
media_audio_play(source.c_str(), resolved_name.c_str(), x, y, z, pitch, volume, is_ui); media_audio_play(source.c_str(), resolved_name.c_str(), x, y, z, pitch, volume, is_ui);
} }
} }
static void SoundEngine_playUI_injection(__attribute__((unused)) SoundEngine_playUI_t original, __attribute__((unused)) SoundEngine *sound_engine, std::string *name, float volume, float pitch) { static void SoundEngine_playUI_injection(__attribute__((unused)) SoundEngine_playUI_t original, __attribute__((unused)) SoundEngine *sound_engine, const std::string &name, float volume, float pitch) {
play(*name, 0, 0, 0, volume, pitch, true); play(name, 0, 0, 0, volume, pitch, true);
} }
static void SoundEngine_play_injection(__attribute__((unused)) SoundEngine_play_t original, __attribute__((unused)) SoundEngine *sound_engine, std::string *name, float x, float y, float z, float volume, float pitch) { static void SoundEngine_play_injection(__attribute__((unused)) SoundEngine_play_t original, __attribute__((unused)) SoundEngine *sound_engine, const std::string &name, float x, float y, float z, float volume, float pitch) {
play(*name, x, y, z, volume, pitch, false); play(name, x, y, z, volume, pitch, false);
} }
// Refresh Data // Refresh Data

View File

@ -168,7 +168,7 @@ void TextInputBox::charPressed(int k) {
static std::string get_rendered_text(Font *font, int width, int scroll_pos, std::string text) { static std::string get_rendered_text(Font *font, int width, int scroll_pos, std::string text) {
std::string rendered_text = text.substr(scroll_pos); std::string rendered_text = text.substr(scroll_pos);
int max_width = width - (PADDING * 2); int max_width = width - (PADDING * 2);
while (font->width(&rendered_text) > max_width) { while (font->width(rendered_text) > max_width) {
rendered_text.pop_back(); rendered_text.pop_back();
} }
return rendered_text; return rendered_text;
@ -195,17 +195,17 @@ void TextInputBox::render() {
rendered_text = get_rendered_text(m_pFont, m_width, scroll_pos, rendered_text); rendered_text = get_rendered_text(m_pFont, m_width, scroll_pos, rendered_text);
int textYPos = (m_height - 8) / 2; int textYPos = (m_height - 8) / 2;
super.drawString(m_pFont, &rendered_text, m_xPos + PADDING, m_yPos + textYPos, text_color); super.drawString(m_pFont, rendered_text, m_xPos + PADDING, m_yPos + textYPos, text_color);
if (m_bCursorOn) { if (m_bCursorOn) {
int cursor_pos = m_insertHead - m_scrollPos; int cursor_pos = m_insertHead - m_scrollPos;
if (cursor_pos >= 0 && cursor_pos <= int(rendered_text.length())) { if (cursor_pos >= 0 && cursor_pos <= int(rendered_text.length())) {
std::string substr = rendered_text.substr(0, cursor_pos); std::string substr = rendered_text.substr(0, cursor_pos);
int xPos = PADDING + m_pFont->width(&substr); int xPos = PADDING + m_pFont->width(substr);
std::string str; std::string str;
str += CURSOR_CHAR; str += CURSOR_CHAR;
super.drawString(m_pFont, &str, m_xPos + xPos, m_yPos + textYPos + 2, 0xffffff); super.drawString(m_pFont, str, m_xPos + xPos, m_yPos + textYPos + 2, 0xffffff);
} }
} }
} }

View File

@ -4,7 +4,7 @@
#include "textures-internal.h" #include "textures-internal.h"
// Disable Texture Loading // Disable Texture Loading
static Texture AppPlatform_linux_loadTexture_injection(__attribute__((unused)) AppPlatform_linux_loadTexture_t original, __attribute__((unused)) AppPlatform_linux *app_platform, __attribute__((unused)) std::string *path, __attribute__((unused)) bool b) { static Texture AppPlatform_linux_loadTexture_injection(__attribute__((unused)) AppPlatform_linux_loadTexture_t original, __attribute__((unused)) AppPlatform_linux *app_platform, __attribute__((unused)) const std::string &path, __attribute__((unused)) bool b) {
Texture out; Texture out;
out.width = 0; out.width = 0;
out.height = 0; out.height = 0;

View File

@ -5,7 +5,7 @@
#include "textures-internal.h" #include "textures-internal.h"
// Lava texture code was originally decompield by @iProgramMC as part of ReMinecraftPE. // Lava texture code was originally decompiled by @iProgramMC as part of ReMinecraftPE.
// See: https://github.com/ReMinecraftPE/mcpe // See: https://github.com/ReMinecraftPE/mcpe
// Structures // Structures

View File

@ -167,9 +167,9 @@ static void Textures_tick_glTexSubImage2D_injection(GLenum target, GLint level,
} }
// Load Textures // Load Textures
static Texture AppPlatform_linux_loadTexture_injection(__attribute__((unused)) AppPlatform_linux_loadTexture_t original, __attribute__((unused)) AppPlatform_linux *app_platform, std::string *path, bool b) { static Texture AppPlatform_linux_loadTexture_injection(__attribute__((unused)) AppPlatform_linux_loadTexture_t original, __attribute__((unused)) AppPlatform_linux *app_platform, const std::string &path, bool b) {
Texture out; Texture out;
std::string real_path = *path; std::string real_path = path;
if (b) { if (b) {
real_path = "data/images/" + real_path; real_path = "data/images/" + real_path;
} }

View File

@ -19,7 +19,7 @@ static void StartMenuScreen_render_Screen_renderBackground_injection(Screen *scr
Minecraft *minecraft = screen->minecraft; Minecraft *minecraft = screen->minecraft;
Textures *textures = minecraft->textures; Textures *textures = minecraft->textures;
std::string texture = "gui/titleBG.png"; std::string texture = "gui/titleBG.png";
textures->loadAndBindTexture(&texture); textures->loadAndBindTexture(texture);
screen->blit(0, 0, 0, 0, screen->width, screen->height, 0x100, 0x100); screen->blit(0, 0, 0, 0, screen->width, screen->height, 0x100, 0x100);
} }
@ -101,7 +101,7 @@ static void StartMenuScreen_render_Screen_render_injection(Screen *screen, int x
glTranslatef(splash_x, splash_y, 0.0f); glTranslatef(splash_x, splash_y, 0.0f);
glRotatef(-20.0f, 0.0f, 0.0f, 1.0f); glRotatef(-20.0f, 0.0f, 0.0f, 1.0f);
// Scale // Scale
int textWidth = screen->font->width(&current_splash); int textWidth = screen->font->width(current_splash);
float timeMS = float(Common::getTimeMs() % 1000) / 1000.0f; float timeMS = float(Common::getTimeMs() % 1000) / 1000.0f;
float scale = max_scale - Mth::abs(0.1f * Mth::sin(2.0f * float(M_PI) * timeMS)); float scale = max_scale - Mth::abs(0.1f * Mth::sin(2.0f * float(M_PI) * timeMS));
float real_text_width = textWidth * max_scale; float real_text_width = textWidth * max_scale;
@ -112,7 +112,7 @@ static void StartMenuScreen_render_Screen_render_injection(Screen *screen, int x
glScalef(scale, scale, scale); glScalef(scale, scale, scale);
// Render // Render
static int line_height = 8; static int line_height = 8;
screen->drawCenteredString(screen->font, &current_splash, 0, -(float(line_height) / 2), 0xffff00); screen->drawCenteredString(screen->font, current_splash, 0, -(float(line_height) / 2), 0xffff00);
// Finish // Finish
glPopMatrix(); glPopMatrix();
} }

View File

@ -95,7 +95,7 @@ CUSTOM_VTABLE(welcome_screen, Screen) {
// Call Original Method // Call Original Method
original_render(self, x, y, param_1); original_render(self, x, y, param_1);
// Text // Text
self->drawCenteredString(self->font, &line1, self->width / 2, text_y, 0xFFFFFFFF); self->drawCenteredString(self->font, line1, self->width / 2, text_y, 0xFFFFFFFF);
}; };
// Positioning // Positioning
vtable->setupPositions = [](Screen *self) { vtable->setupPositions = [](Screen *self) {

View File

@ -31,7 +31,7 @@ static int32_t Button_hovered_injection(__attribute__((unused)) Button_hovered_t
// Check // Check
return x >= button_x1 && x < button_x2 && y >= button_y1 && y < button_y2; return x >= button_x1 && x < button_x2 && y >= button_y1 && y < button_y2;
} }
static void LargeImageButton_render_GuiComponent_drawCenteredString_injection(GuiComponent *component, Font *font, std::string *text, int32_t x, int32_t y, int32_t color) { static void LargeImageButton_render_GuiComponent_drawCenteredString_injection(GuiComponent *component, Font *font, const std::string &text, int32_t x, int32_t y, int32_t color) {
// Change Color On Hover // Change Color On Hover
if (color == 0xe0e0e0 && Button_hovered_injection(nullptr, (Button *) component, nullptr, 0, 0)) { if (color == 0xe0e0e0 && Button_hovered_injection(nullptr, (Button *) component, nullptr, 0, 0)) {
color = 0xffffa0; color = 0xffffa0;
@ -47,7 +47,7 @@ template <typename T>
static Button *create_button(int id, std::string text) { static Button *create_button(int id, std::string text) {
T *button = new T; T *button = new T;
ALLOC_CHECK(button); ALLOC_CHECK(button);
button->constructor(id, &text); button->constructor(id, text);
return (Button *) button; return (Button *) button;
} }
Button *touch_create_button(int id, std::string text) { Button *touch_create_button(int id, std::string text) {

View File

@ -16,7 +16,7 @@ const char *version_get() {
} }
// Injection For Touch GUI Version // Injection For Touch GUI Version
static std::string Common_getGameVersionString_injection(__attribute__((unused)) Common_getGameVersionString_t original, __attribute__((unused)) std::string *version_suffix) { static std::string Common_getGameVersionString_injection(__attribute__((unused)) Common_getGameVersionString_t original, __attribute__((unused)) const std::string &version_suffix) {
// Set Version // Set Version
return version_get(); return version_get();
} }

View File

@ -92,6 +92,7 @@ set(SRC
src/level/LevelSummary.def src/level/LevelSummary.def
src/level/DistanceChunkSorter.def src/level/DistanceChunkSorter.def
src/level/renderer/Chunk.def src/level/renderer/Chunk.def
src/level/LevelStorage.def
src/item/ItemRenderer.def src/item/ItemRenderer.def
src/item/ItemInHandRenderer.def src/item/ItemInHandRenderer.def
src/item/AuxDataTileItem.def src/item/AuxDataTileItem.def

View File

@ -1,4 +1,4 @@
method std::string parse(ConnectedClient *client, std::string *command) = 0x6aa8c; method std::string parse(ConnectedClient &client, const std::string &command) = 0x6aa8c;
property Minecraft *minecraft = 0x18; property Minecraft *minecraft = 0x18;
property OffsetPosTranslator pos_translator = 0x1c; property OffsetPosTranslator pos_translator = 0x1c;

View File

@ -1,5 +1,5 @@
method void from(int *x, int *y, int *z) = 0x27c98; method void from(int &x, int &y, int &z) = 0x27c98;
method void to(float *x, float *y, float *z) = 0x27be0; method void to(float &x, float &y, float &z) = 0x27be0;
property float x = 0x4; property float x = 0x4;
property float y = 0x8; property float y = 0x8;

View File

@ -1,6 +1,6 @@
vtable 0x1020d8; vtable 0x1020d8;
virtual-method void saveScreenshot(std::string *path, int width, int height) = 0x8; virtual-method void saveScreenshot(const std::string &path, int width, int height) = 0x8;
virtual-method AppPlatform_readAssetFile_return_value readAssetFile(std::string *path) = 0x34; virtual-method AppPlatform_readAssetFile_return_value readAssetFile(const std::string &path) = 0x34;
virtual-method Texture loadTexture(std::string *path, bool b) = 0xc; virtual-method Texture loadTexture(const std::string &path, bool b) = 0xc;
virtual-method std::string getDateString(int time) = 0x24; virtual-method std::string getDateString(int time) = 0x24;

View File

@ -1,7 +1,7 @@
virtual-method void render(Entity *entity, float param_2, float param_3, float param_4, float param_5, float param_6) = 0x8; virtual-method void render(Entity *entity, float param_2, float param_3, float param_4, float param_5, float param_6) = 0x8;
// Can be called without an EntityRenderer, just do EntityRenderer_bindTexture(NULL, &file); // Can be called without an EntityRenderer, just do EntityRenderer_bindTexture(NULL, &file);
method void bindTexture(std::string *file) = 0x62540; method void bindTexture(const std::string &file) = 0x62540;
// Globals // Globals
static-property EntityRenderDispatcher *entityRenderDispatcher = 0x137bc0; static-property EntityRenderDispatcher *entityRenderDispatcher = 0x137bc0;

View File

@ -1,7 +1,7 @@
extends Entity; extends Entity;
vtable 0x10c5b0; vtable 0x10c5b0;
constructor (Level *level, float x, float y, float z, ItemInstance *item) = 0x86d70; constructor (Level *level, float x, float y, float z, const ItemInstance &item) = 0x86d70;
property ItemInstance item = 0xd0; property ItemInstance item = 0xd0;
property int age = 0xdc; property int age = 0xdc;

View File

@ -16,12 +16,12 @@ method uchar *getCreator() = 0x17538;
method LevelStorageSource *getLevelSource() = 0x16e84; method LevelStorageSource *getLevelSource() = 0x16e84;
method void handleMouseDown(int param_1, bool can_destroy) = 0x1584c; method void handleMouseDown(int param_1, bool can_destroy) = 0x1584c;
method void handleBuildAction(uint *build_action_intention) = 0x15920; method void handleBuildAction(uint *build_action_intention) = 0x15920;
method void joinMultiplayer(PingedCompatibleServer *server) = 0x165f4; method void joinMultiplayer(const PingedCompatibleServer &server) = 0x165f4;
virtual-method void update() = 0x24; virtual-method void update() = 0x24;
virtual-method int handleBack(bool do_nothing) = 0x34; virtual-method int handleBack(bool do_nothing) = 0x34;
virtual-method void init() = 0x38; virtual-method void init() = 0x38;
virtual-method void selectLevel(std::string *level_dir, std::string *level_name, LevelSettings *settings) = 0x40; virtual-method void selectLevel(const std::string &level_dir, const std::string &level_name, const LevelSettings &settings) = 0x40;
property int screen_width = 0x20; property int screen_width = 0x20;
property int screen_height = 0x24; property int screen_height = 0x24;

View File

@ -1,2 +1,2 @@
method int width(std::string *string) = 0x24d4c; method int width(const std::string &string) = 0x24d4c;
method void draw(std::string *string, float x, float y, uint color) = 0x250e0; method void draw(const std::string &string, float x, float y, uint color) = 0x250e0;

View File

@ -7,11 +7,11 @@ method void handleClick(int param_2, int param_3, int param_4) = 0x2599c;
method void renderOnSelectItemNameText(int param_1, Font *font, int param_2) = 0x26aec; method void renderOnSelectItemNameText(int param_1, Font *font, int param_2) = 0x26aec;
method void renderToolBar(float alpha, int slot_y, int screen_w) = 0x26c30; method void renderToolBar(float alpha, int slot_y, int screen_w) = 0x26c30;
method void renderChatMessages(int y_offset, uint max_messages, bool disable_fading, Font *font) = 0x273d8; method void renderChatMessages(int y_offset, uint max_messages, bool disable_fading, Font *font) = 0x273d8;
method void onConfigChanged(Config *config) = 0x255bc; method void onConfigChanged(const Config &config) = 0x255bc;
method void addMessage(std::string *text) = 0x27820; method void addMessage(const std::string &text) = 0x27820;
method void getSlotPos(int slot, int *x, int *y) = 0x25548; method void getSlotPos(int slot, int &x, int &y) = 0x25548;
method void renderSlot(int slot, int x, int y, float alpha) = 0x25cc0; method void renderSlot(int slot, int x, int y, float alpha) = 0x25cc0;
method void renderSlotText(ItemInstance *item, float x, float y, bool finite, bool shadow) = 0x25df8; method void renderSlotText(const ItemInstance *item, float x, float y, bool finite, bool shadow) = 0x25df8;
method void handleKeyPressed(int key) = 0x25a08; method void handleKeyPressed(int key) = 0x25a08;
method void renderHearts() = 0x2641c; method void renderHearts() = 0x2641c;
method void renderDebugInfo() = 0x26958; method void renderDebugInfo() = 0x26958;

View File

@ -1,7 +1,7 @@
extends GuiComponent; extends GuiComponent;
size 0x28; size 0x28;
constructor (int id, std::string *text) = 0x1bc54; constructor (int id, const std::string &text) = 0x1bc54;
method int hovered(Minecraft *minecraft, int click_x, int click_y) = 0x1be2c; method int hovered(Minecraft *minecraft, int click_x, int click_y) = 0x1be2c;

View File

@ -4,8 +4,8 @@ constructor () = 0x28204;
vtable 0x1039b0; vtable 0x1039b0;
method void blit(int x_dest, int y_dest, int x_src, int y_src, int width_dest, int height_dest, int width_src, int height_src) = 0x282a4; method void blit(int x_dest, int y_dest, int x_src, int y_src, int width_dest, int height_dest, int width_src, int height_src) = 0x282a4;
method void drawCenteredString(Font *font, std::string *text, int x, int y, uint color) = 0x2821c; method void drawCenteredString(Font *font, const std::string &text, int x, int y, uint color) = 0x2821c;
method void drawString(Font *font, std::string *text, int x, int y, uint color) = 0x28284; method void drawString(Font *font, const std::string &text, int x, int y, uint color) = 0x28284;
method void fill(int x1, int y1, int x2, int y2, uint color) = 0x285f0; method void fill(int x1, int y1, int x2, int y2, uint color) = 0x285f0;
method void fillGradient(int x1, int y1, int x2, int y2, int color1, int color2) = 0x287c0; method void fillGradient(int x1, int y1, int x2, int y2, int color1, int color2) = 0x287c0;

View File

@ -1,6 +1,6 @@
extends ImageButton; extends ImageButton;
constructor (Options_Option *option) = 0x1c968; constructor (const Options_Option *option) = 0x1c968;
method void updateImage(Options *options) = 0x1ca58; method void updateImage(Options *options) = 0x1ca58;

View File

@ -1,6 +1,6 @@
extends GuiComponent; extends GuiComponent;
constructor (int param_2, IntRectangle *bb, IntRectangle *itembb, int columns, int item_count, float scale, IntRectangle *itembb2) = 0x22b44; constructor (int param_2, const IntRectangle &bb, const IntRectangle &itembb, int columns, int item_count, float scale, const IntRectangle &itembb2) = 0x22b44;
method void setContentOffset(float x, float y) = 0x220a0; method void setContentOffset(float x, float y) = 0x220a0;
method void render(float param_1, float param_2, float alpha) = 0x22ee4; method void render(float param_1, float param_2, float alpha) = 0x22ee4;

View File

@ -1,4 +1,4 @@
extends Button; extends Button;
size 0x28; size 0x28;
constructor (int id, std::string *text) = 0x1c168; constructor (int id, const std::string &text) = 0x1c168;

View File

@ -1,5 +1,5 @@
extends Screen; extends Screen;
method int handleAddItem(int slot, ItemInstance *item) = 0x327a0; method int handleAddItem(int slot, const ItemInstance *item) = 0x327a0;
property FurnaceTileEntity *tile_entity = 0x1d0; property FurnaceTileEntity *tile_entity = 0x1d0;

View File

@ -2,7 +2,7 @@ extends Screen;
vtable 0x104f50; vtable 0x104f50;
method std::string getUniqueLevelName(std::string *name) = 0x388ec; method std::string getUniqueLevelName(const std::string &name) = 0x388ec;
property bool should_create_world = 0xfc; property bool should_create_world = 0xfc;
property bool world_created = 0xf9; property bool world_created = 0xf9;

View File

@ -2,4 +2,4 @@ extends Screen;
size 0x68; size 0x68;
constructor (std::string *world_name) = 0x31404; constructor (const std::string &world_name) = 0x31404;

View File

@ -4,7 +4,7 @@ size 0x158;
vtable 0x105758; vtable 0x105758;
method std::string getUniqueLevelName(std::string *name) = 0x3d82c; method std::string getUniqueLevelName(const std::string &name) = 0x3d82c;
property bool should_create_world = 0x154; property bool should_create_world = 0x154;
property bool world_created = 0x151; property bool world_created = 0x151;

View File

@ -2,4 +2,4 @@ extends Item;
size 0x34; size 0x34;
constructor (int id, ArmorMaterial *material, int param_3, int slot) = 0x9362c; constructor (int id, const ArmorMaterial &material, int param_3, int slot) = 0x9362c;

View File

@ -12,7 +12,7 @@ virtual-method int useOn(ItemInstance *item_instance, Player *player, Level *lev
// Normally returns 0 // Normally returns 0
virtual-method int getUseDuration(ItemInstance *item_instance) = 0x24; virtual-method int getUseDuration(ItemInstance *item_instance) = 0x24;
virtual-method ItemInstance useTimeDepleted(ItemInstance *item_instance, Level *level, Player *player) = 0x28; virtual-method ItemInstance useTimeDepleted(ItemInstance *item_instance, Level *level, Player *player) = 0x28;
virtual-method int getDestorySpeed(ItemInstance *item_instance, Tile *tile) = 0x2c; virtual-method int getDestroySpeed(ItemInstance *item_instance, Tile *tile) = 0x2c;
virtual-method ItemInstance *use(ItemInstance *item_instance, Level *level, Player *player) = 0x30; virtual-method ItemInstance *use(ItemInstance *item_instance, Level *level, Player *player) = 0x30;
virtual-method void hurtEnemy(ItemInstance *itemInstance, Mob *mob) = 0x44; virtual-method void hurtEnemy(ItemInstance *itemInstance, Mob *mob) = 0x44;
virtual-method bool mineBlock(ItemInstance *instance, int tile_id, int x, int y, int z) = 0x48; virtual-method bool mineBlock(ItemInstance *instance, int tile_id, int x, int y, int z) = 0x48;
@ -20,8 +20,8 @@ virtual-method bool mineBlock(ItemInstance *instance, int tile_id, int x, int y,
virtual-method void interactEnemy(ItemInstance *item_instance, Mob *mob) = 0x54; virtual-method void interactEnemy(ItemInstance *item_instance, Mob *mob) = 0x54;
virtual-method bool isFood() = 0x64; virtual-method bool isFood() = 0x64;
virtual-method bool isArmor() = 0x68; virtual-method bool isArmor() = 0x68;
virtual-method void setDescriptionId(std::string *name) = 0x6c; virtual-method void setDescriptionId(const std::string &name) = 0x6c;
virtual-method std::string getDescriptionId(ItemInstance *item_instance) = 0x7c; virtual-method std::string getDescriptionId(const ItemInstance *item_instance) = 0x7c;
// This returns an Item*, but it's never called normally so it doesn't matter if we invent a better system over top of it // This returns an Item*, but it's never called normally so it doesn't matter if we invent a better system over top of it
virtual-method ItemInstance *getCraftingRemainingItem(ItemInstance *item_instance) = 0x84; virtual-method ItemInstance *getCraftingRemainingItem(ItemInstance *item_instance) = 0x84;
// Swing = 0, eating = 1, drinking = 2, bow = 4, anything else is nothing // Swing = 0, eating = 1, drinking = 2, bow = 4, anything else is nothing

View File

@ -1,9 +1,9 @@
size 0xc; size 0xc;
constructor item(Item *item) = 0x9992c; constructor item(const Item *item) = 0x9992c;
constructor tile(Tile *item) = 0x998e4; constructor tile(const Tile *item) = 0x998e4;
constructor tile_extra(Tile *item, int count, int auxiliary) = 0x99918; constructor tile_extra(const Tile *item, int count, int auxiliary) = 0x99918;
constructor item_extra(Item *item, int count, int auxiliary) = 0x99960; constructor item_extra(const Item *item, int count, int auxiliary) = 0x99960;
static-method ItemInstance *fromTag(CompoundTag *tag) = 0x9a124; static-method ItemInstance *fromTag(CompoundTag *tag) = 0x9a124;

View File

@ -1,9 +1,9 @@
static-method void renderGuiItem_one(Font *font, Textures *textures, ItemInstance *item_instance, float x, float y, bool param_3) = 0x63e58; static-method void renderGuiItem_one(Font *font, Textures *textures, const ItemInstance *item_instance, float x, float y, bool param_3) = 0x63e58;
static-method void renderGuiItem_two(Font *font, Textures *textures, ItemInstance *item_instance, float x, float y, float w, float h, bool param_5) = 0x63be0; static-method void renderGuiItem_two(Font *font, Textures *textures, const ItemInstance *item_instance, float x, float y, float w, float h, bool param_5) = 0x63be0;
static-method void renderGuiItemCorrect(Font *font, Textures *textures, ItemInstance *item_instance, int x, int y) = 0x639a0; static-method void renderGuiItemCorrect(Font *font, Textures *textures, const ItemInstance *item_instance, int x, int y) = 0x639a0;
static-method void renderGuiItemDecorations(ItemInstance *item, float x, float y) = 0x63748; static-method void renderGuiItemDecorations(const ItemInstance *item, float x, float y) = 0x63748;
static-method void blit(float x, float y, float texture_x, float texture_y, float w, float h) = 0x638c0; static-method void blit(float x, float y, float texture_x, float texture_y, float w, float h) = 0x638c0;
// This doesn't include things that it doesn't need for item renderering (like the level) // This doesn't include things that it doesn't need for item rendering (like the level)
// So if you are (ab)using it for something else, be sure to set what you need // So if you are (ab)using it for something else, be sure to set what you need
static-property TileRenderer *tileRenderer = 0x137c18; static-property TileRenderer *tileRenderer = 0x137c18;

View File

@ -10,7 +10,7 @@ virtual-method Feature *getGrassFeature(Random *random) = 0xc;
virtual-method float adjustScale(float scale) = 0x10; virtual-method float adjustScale(float scale) = 0x10;
virtual-method float adjustDepth(float depth) = 0x14; virtual-method float adjustDepth(float depth) = 0x14;
virtual-method uint getSkyColor(float temp) = 0x18; virtual-method uint getSkyColor(float temp) = 0x18;
//virtual-method ??? *getMobs(MobCategory *category) = 0x1c; //virtual-method ??? *getMobs(const MobCategory &category) = 0x1c;
virtual-method float getCreatureProbability() = 0x20; virtual-method float getCreatureProbability() = 0x20;
property int color = 0x2c; property int color = 0x2c;

View File

@ -1,6 +1,6 @@
virtual-method LevelChunk *load(Level *level, int chunk_x, int chunk_z) = 0x8; virtual-method LevelChunk *load(Level *level, int chunk_x, int chunk_z) = 0x8;
virtual-method void save(Level *level, LevelChunk *level_chunk) = 0xc; virtual-method void save(Level *level, LevelChunk *level_chunk) = 0xc;
virtual-method void saveEntities(Level *level, LevelChunk *level_chunk) = 0x10; virtual-method void saveEntities(Level *level, LevelChunk *level_chunk) = 0x10;
virtual-method void saveAll(Level *level, std::vector<LevelChunk *> *level_chunks) = 0x14; virtual-method void saveAll(Level *level, std::vector<LevelChunk *> &level_chunks) = 0x14;
virtual-method void tick() = 0x18; virtual-method void tick() = 0x18;
virtual-method void flush() = 0x1c; virtual-method void flush() = 0x1c;

View File

@ -17,22 +17,22 @@ method void updateNearbyTiles(int x, int y, int z, int id) = 0xa36cc;
method void neighborChanged(int x, int y, int z, int id) = 0xa3658; method void neighborChanged(int x, int y, int z, int id) = 0xa3658;
// clip_liquids and clip_hitboxes default to true // clip_liquids and clip_hitboxes default to true
// If clip_hitboxes is true it will ignore blocks that have their getAABB return NULL // If clip_hitboxes is true it will ignore blocks that have their getAABB return NULL
method HitResult clip(uchar *param_1, uchar *param_2, bool clip_liquids, bool clip_hitboxes) = 0xa3db0; method HitResult clip(const Vec3 &param_1, const Vec3 &param_2, bool clip_liquids, bool clip_hitboxes) = 0xa3db0;
// Valid particles are crit, flame, lava, smoke, largesmoke, reddust, snowballpoof, and explode // Valid particles are crit, flame, lava, smoke, largesmoke, reddust, snowballpoof, and explode
// There is also bubble which only works under water and ironcrack which will crash the game // There is also bubble which only works under water and ironcrack which will crash the game
method void addParticle(std::string *particle, float x, float y, float z, float deltaX, float deltaY, float deltaZ, int count) = 0xa449c; method void addParticle(const std::string &particle, float x, float y, float z, float deltaX, float deltaY, float deltaZ, int count) = 0xa449c;
method Entity *getEntity(int id) = 0xa45a4; method Entity *getEntity(int id) = 0xa45a4;
method bool addEntity(Entity *entity) = 0xa7cbc; method bool addEntity(Entity *entity) = 0xa7cbc;
method int getBrightness2(LightLayer *layer, int x, int y, int z) = 0xa3c70; method int getBrightness2(const LightLayer &layer, int x, int y, int z) = 0xa3c70;
method int getRawBrightness(int x, int y, int z) = 0xa3b70; method int getRawBrightness(int x, int y, int z) = 0xa3b70;
// See mods/src/sound/repository.cpp for a list of sounds // See mods/src/sound/repository.cpp for a list of sounds
method void playSound(Entity *entity, std::string *name, float volume, float pitch) = 0xa42a8; method void playSound(Entity *entity, const std::string &name, float volume, float pitch) = 0xa42a8;
// Searches aabb for entities, ignores the entity "ignore", overwrites the same vector each time // Searches aabb for entities, ignores the entity "ignore", overwrites the same vector each time
method std::vector<Entity*> *getEntities(Entity *ignore, AABB *aabb) = 0xa5a4c; method std::vector<Entity *> *getEntities(Entity *ignore, const AABB &aabb) = 0xa5a4c;
// Searches aabb for entities of type type_id, adds then to buff, returns the number of entities added // Searches aabb for entities of type type_id, adds then to buff, returns the number of entities added
method int getEntitiesOfType(int type_id, AABB *aabb, std::vector<Entity*> *buff) = 0xa612c; method int getEntitiesOfType(int type_id, const AABB &aabb, std::vector<Entity *> &buff) = 0xa612c;
// Searches aabb for entities of base type base_type, adds then to buff, returns the number of entities added // Searches aabb for entities of base type base_type, adds then to buff, returns the number of entities added
method int getEntitiesOfClass(int base_type, AABB *aabb, std::vector<Entity*> *buff) = 0xa6240; method int getEntitiesOfClass(int base_type, const AABB &aabb, std::vector<Entity *> &buff) = 0xa6240;
// This will implicitly make the tile entity if the tile at x, y, z doesn't have one and is an EntityTile // This will implicitly make the tile entity if the tile at x, y, z doesn't have one and is an EntityTile
method TileEntity *getTileEntity(int x, int y, int z) = 0xa55d4; method TileEntity *getTileEntity(int x, int y, int z) = 0xa55d4;
method void setTileEntity(int x, int y, int z, TileEntity *tileEntity) = 0xa7b58; method void setTileEntity(int x, int y, int z, TileEntity *tileEntity) = 0xa7b58;

View File

@ -0,0 +1 @@
vtable 0x1108a8;

View File

@ -1,2 +1,2 @@
virtual-method void deleteLevel(std::string *level_name) = 0x20; virtual-method void deleteLevel(const std::string &level_name) = 0x20;
virtual-method void getLevelList(std::vector<LevelSummary> *level_list) = 0xc; virtual-method void getLevelList(std::vector<LevelSummary> &level_list) = 0xc;

View File

@ -3,4 +3,4 @@ extends Level;
vtable 0x109da0; vtable 0x109da0;
size 0xb80; size 0xb80;
constructor (uchar *storage, uchar *name, LevelSettings *settings, int param_4, Dimension *dimension) = 0x7692c; constructor (LevelStorage *storage, const std::string &name, const LevelSettings &settings, int param_4, Dimension *dimension) = 0x7692c;

View File

@ -4,6 +4,6 @@ property int z = 0xc;
property bool field_1c[3] = 0x1c; property bool field_1c[3] = 0x1c;
property bool visible = 0x4c; property bool visible = 0x4c;
method float distanceToSqr(Entity *entity) = 0x47ba0; method float distanceToSqr(const Entity *entity) = 0x47ba0;
method int getList(int a) = 0x47e48; method int getList(int a) = 0x47e48;
method RenderChunk *getRenderChunk(int a) = 0x47e74; method RenderChunk *getRenderChunk(int a) = 0x47e74;

View File

@ -1,9 +1,9 @@
method void tick() = 0x4da1c; method void tick() = 0x4da1c;
method void render(Mob *mob, int param_1, float delta) = 0x4f710; method void render(Mob *mob, int param_1, float delta) = 0x4f710;
method void renderDebug(AABB *aabb, float delta) = 0x4d310; method void renderDebug(const AABB &aabb, float delta) = 0x4d310;
method void generateSky() = 0x4d0d4; method void generateSky() = 0x4d0d4;
method void renderHitSelect(Player *player, HitResult *hit_result, int i, void *vp, float f) = 0x4e318; method void renderHitSelect(Player *player, const HitResult &hit_result, int i, void *vp, float f) = 0x4e318;
method void renderHitOutline(Player *player, HitResult *hit_result, int i, void *vp, float f) = 0x4dc14; method void renderHitOutline(Player *player, const HitResult &hit_result, int i, void *vp, float f) = 0x4dc14;
method int renderChunks(int start, int end, int a, float b) = 0x4f35c; method int renderChunks(int start, int end, int a, float b) = 0x4f35c;
property Minecraft *minecraft = 0xb4; property Minecraft *minecraft = 0xb4;

View File

@ -2,7 +2,7 @@ method void render() = 0x52800;
method void renderChunks() = 0x52708; method void renderChunks() = 0x52708;
method void clear() = 0x5288c; method void clear() = 0x5288c;
method void init(float x, float y, float z) = 0x526bc; method void init(float x, float y, float z) = 0x526bc;
method void addR(RenderChunk *chunk) = 0x526dc; method void addR(const RenderChunk &chunk) = 0x526dc;
property int size = 0x1c; property int size = 0x1c;
property RenderChunk *chunks = 0x10; property RenderChunk *chunks = 0x10;

View File

@ -1,4 +1,4 @@
static-method std::string getGameVersionString(std::string *version_suffix) = 0x15068; static-method std::string getGameVersionString(const std::string &version_suffix) = 0x15068;
// These are not actually part of "Common", but they have to go somewhere. // These are not actually part of "Common", but they have to go somewhere.
static-method void renderCursor(float x, float y, Minecraft *minecraft) = 0x480c4; static-method void renderCursor(float x, float y, Minecraft *minecraft) = 0x480c4;

View File

@ -4,10 +4,10 @@ vtable-size 0x34;
size 0x24; size 0x24;
constructor (std::string name) = 0x69740; constructor (std::string name) = 0x69740;
method bool getBoolean(std::string *name) = 0xd1b28; method bool getBoolean(const std::string &name) = 0xd1b28;
method char getByte(std::string *name) = 0x7f00c; method char getByte(const std::string &name) = 0x7f00c;
method void putByte(std::string *name, char i) = 0x7d6d0; method void putByte(const std::string &name, char i) = 0x7d6d0;
method short getShort(std::string *name) = 0x459c0; method short getShort(const std::string &name) = 0x459c0;
method void putShort(std::string *name, short i) = 0x7d60c; method void putShort(const std::string &name, short i) = 0x7d60c;
method bool contains(std::string *name, int type) = 0x7d130; method bool contains(const std::string &name, int type) = 0x7d130;
method void put(std::string *name, Tag *tag) = 0x6a040; method void put(const std::string &name, Tag *tag) = 0x6a040;

View File

@ -1,3 +1,3 @@
static-method void loadLanguage(AppPlatform *app, std::string language_name) = 0x680d0; static-method void loadLanguage(AppPlatform *app, const std::string &language_name) = 0x680d0;
static-property std::map<std::string, std::string> _strings = 0x137d98; static-property std::map<std::string, std::string> _strings = 0x137d98;

View File

@ -1,8 +1,8 @@
method void init(Minecraft *minecraft, Options *options) = 0x67760; method void init(Minecraft *minecraft, Options *options) = 0x67760;
method void enable(bool state) = 0x6776c; method void enable(bool state) = 0x6776c;
method void update(Mob *listener_mob, float listener_angle) = 0x67778; method void update(Mob *listener_mob, float listener_angle) = 0x67778;
method void playUI(std::string *name, float volume, float pitch) = 0x67864; method void playUI(const std::string &name, float volume, float pitch) = 0x67864;
method void play(std::string *name, float x, float y, float z, float volume, float pitch) = 0x67860; method void play(const std::string &name, float x, float y, float z, float volume, float pitch) = 0x67860;
property Minecraft *minecraft = 0xa08; property Minecraft *minecraft = 0xa08;
property Options *options = 0x4; property Options *options = 0x4;

View File

@ -1,3 +1,3 @@
static-method std::string stringTrim(std::string *str) = 0x77c40; static-method std::string stringTrim(const std::string &str) = 0x77c40;
static-method int hashCode(std::string *str) = 0x77a50; static-method int hashCode(const std::string &str) = 0x77a50;
static-method std::string *stringReplace(std::string *str, std::string *what, std::string *with, int param_1) = 0x779f0; static-method std::string &stringReplace(const std::string &str, const std::string &what, const std::string &with, int param_1) = 0x779f0;

View File

@ -2,6 +2,6 @@ vtable-destructor-offset 0x4; // Why
vtable 0x1090f0; vtable 0x1090f0;
virtual-method void levelGenerated(Level *level) = 0x0; virtual-method void levelGenerated(Level *level) = 0x0;
virtual-method void onDisconnect(RakNet_RakNetGUID *guid) = 0x18; virtual-method void onDisconnect(const RakNet_RakNetGUID &guid) = 0x18;
virtual-method void handle_SignUpdatePacket(RakNet_RakNetGUID *guid, SignUpdatePacket *packet) = 0xcc; virtual-method void handle_SignUpdatePacket(const RakNet_RakNetGUID &guid, SignUpdatePacket *packet) = 0xcc;
virtual-method void handle_ChatPacket(RakNet_RakNetGUID *rak_net_guid, ChatPacket *packet) = 0xc8; virtual-method void handle_ChatPacket(const RakNet_RakNetGUID &rak_net_guid, ChatPacket *packet) = 0xc8;

View File

@ -2,8 +2,8 @@ vtable 0x109ae8;
constructor () = 0x73b20; constructor () = 0x73b20;
virtual-method void sendTo(RakNet_RakNetGUID *guid, Packet *packet) = 0x3c; virtual-method void sendTo(const RakNet_RakNetGUID &guid, Packet &packet) = 0x3c;
virtual-method void send(Packet *packet) = 0x38; virtual-method void send(Packet &packet) = 0x38;
virtual-method uint isServer() = 0x48; virtual-method uint isServer() = 0x48;
virtual-method void pingForHosts(int base_port) = 0x14; virtual-method void pingForHosts(int base_port) = 0x14;

View File

@ -2,8 +2,8 @@ extends NetEventCallback;
vtable 0x109b98; vtable 0x109b98;
method Player *getPlayer(RakNet_RakNetGUID *guid) = 0x75464; method Player *getPlayer(const RakNet_RakNetGUID &guid) = 0x75464;
method Player *popPendingPlayer(RakNet_RakNetGUID *guid) = 0x75db4; method Player *popPendingPlayer(const RakNet_RakNetGUID &guid) = 0x75db4;
method void displayGameMessage(std::string *message) = 0x750c4; method void displayGameMessage(const std::string &message) = 0x750c4;
property Minecraft *minecraft = 0x8; property Minecraft *minecraft = 0x8;

View File

@ -3,7 +3,7 @@ method void Write_int(int *i) = 0x18454;
method void Write_ushort(ushort *i) = 0x45a68; method void Write_ushort(ushort *i) = 0x45a68;
method void Write_short(short *i) = 0x71918; method void Write_short(short *i) = 0x71918;
// right_aligned should be true // right_aligned should be true
method void WriteBits(uchar *buff, uint bits, bool right_aligned) = 0xd41b4; method void WriteBits(const uchar *buff, uint bits, bool right_aligned) = 0xd41b4;
method void Read_uchar(uchar *i) = 0x45ab0; method void Read_uchar(uchar *i) = 0x45ab0;
method void Read_int(int *i) = 0x184ec; method void Read_int(int *i) = 0x184ec;

View File

@ -1,2 +1,2 @@
constructor () = 0xa0778; constructor () = 0xa0778;
method void addFurnaceRecipe(int input_item_id, ItemInstance *result) = 0xa0714; method void addFurnaceRecipe(int input_item_id, const ItemInstance &result) = 0xa0714;

View File

@ -1,6 +1,6 @@
constructor () = 0x9cabc; constructor () = 0x9cabc;
method void addShapelessRecipe(ItemInstance *result, std::vector<Recipes_Type> *ingredients) = 0x9c3dc; method void addShapelessRecipe(const ItemInstance &result, const std::vector<Recipes_Type> &ingredients) = 0x9c3dc;
method void addShapedRecipe_1(ItemInstance *result, std::string *line_1, std::vector<Recipes_Type> *ingredients) = 0x9ca74; method void addShapedRecipe_1(const ItemInstance &result, const std::string &line_1, const std::vector<Recipes_Type> &ingredients) = 0x9ca74;
method void addShapedRecipe_2(ItemInstance *result, std::string *line_1, std::string *line_2, std::vector<Recipes_Type> *ingredients) = 0x9ca24; method void addShapedRecipe_2(const ItemInstance &result, const std::string &line_1, const std::string &line_2, const std::vector<Recipes_Type> &ingredients) = 0x9ca24;
method void addShapedRecipe_3(ItemInstance *result, std::string *line_1, std::string *line_2, std::string *line_3, std::vector<Recipes_Type> *ingredients) = 0x9c9d0; method void addShapedRecipe_3(const ItemInstance &result, const std::string &line_1, const std::string &line_2, const std::string &line_3, const std::vector<Recipes_Type> &ingredients) = 0x9c9d0;

View File

@ -1,4 +1,4 @@
method void tick(bool param_1) = 0x531c4; method void tick(bool param_1) = 0x531c4;
method int loadAndBindTexture(std::string *name) = 0x539cc; method int loadAndBindTexture(const std::string &name) = 0x539cc;
method int assignTexture(std::string *name, uchar *data) = 0x5354c; method int assignTexture(const std::string &name, uchar *data) = 0x5354c;
method void addDynamicTexture(DynamicTexture *texture) = 0x534f8; method void addDynamicTexture(DynamicTexture *texture) = 0x534f8;

View File

@ -3,7 +3,7 @@ static-method void initTiles() = 0xc358c;
vtable 0x115670; vtable 0x115670;
vtable-size 0x104; vtable-size 0x104;
constructor (int id, int texture, Material *material) = 0xc33a0; constructor (int id, int texture, const Material *material) = 0xc33a0;
size 0x5c; size 0x5c;
method Tile *init() = 0xc34dc; method Tile *init() = 0xc34dc;
@ -19,7 +19,7 @@ virtual-method int getTexture2(int face, int data) = 0x2c;
virtual-method int getTexture3(LevelSource *level, int x, int y, int z, int face) = 0x30; virtual-method int getTexture3(LevelSource *level, int x, int y, int z, int face) = 0x30;
virtual-method AABB *getAABB(Level *level, int x, int y, int z) = 0x34; virtual-method AABB *getAABB(Level *level, int x, int y, int z) = 0x34;
// Chain Tile_setShape_non_virtual and Tile_addAABBs_non_virtual, look at how stairs and fences do it // Chain Tile_setShape_non_virtual and Tile_addAABBs_non_virtual, look at how stairs and fences do it
virtual-method void addAABBs(Level *level, int x, int y, int z, AABB *intersecting, std::vector<AABB> *aabbs) = 0x38; virtual-method void addAABBs(Level *level, int x, int y, int z, const AABB *intersecting, std::vector<AABB> &aabbs) = 0x38;
virtual-method bool isSolidRender() = 0x40; virtual-method bool isSolidRender() = 0x40;
virtual-method bool mayPlace(Level *level, int x, int y, int z, uchar face) = 0x4c; virtual-method bool mayPlace(Level *level, int x, int y, int z, uchar face) = 0x4c;
virtual-method bool mayPlace2(Level *level, int x, int y, int z) = 0x50; virtual-method bool mayPlace2(Level *level, int x, int y, int z) = 0x50;
@ -49,8 +49,8 @@ virtual-method bool getSignal2(LevelSource *level, int x, int y, int z, int dire
virtual-method bool getDirectSignal(Level *level, int x, int y, int z, int direction) = 0xc8; virtual-method bool getDirectSignal(Level *level, int x, int y, int z, int direction) = 0xc8;
virtual-method void entityInside(Level *level, int x, int y, int z, Entity *entity) = 0xcc; virtual-method void entityInside(Level *level, int x, int y, int z, Entity *entity) = 0xcc;
virtual-method std::string getDescriptionId() = 0xdc; virtual-method std::string getDescriptionId() = 0xdc;
virtual-method Tile *setDescriptionId(std::string *description_id) = 0xe0; virtual-method Tile *setDescriptionId(const std::string &description_id) = 0xe0;
virtual-method Tile *setSoundType(Tile_SoundType *sound_type) = 0xe8; virtual-method Tile *setSoundType(const Tile_SoundType &sound_type) = 0xe8;
virtual-method Tile *setLightEmission(float light) = 0xf0; virtual-method Tile *setLightEmission(float light) = 0xf0;
virtual-method Tile *setExplodeable(float explodeable) = 0xf4; virtual-method Tile *setExplodeable(float explodeable) = 0xf4;
virtual-method Tile *setDestroyTime(float destroy_time) = 0xf8; virtual-method Tile *setDestroyTime(float destroy_time) = 0xf8;

View File

@ -1,5 +1,5 @@
extends TileEntity; extends TileEntity;
virtual-method ItemInstance *getItem(int slot) = 0x2c; virtual-method ItemInstance *getItem(int slot) = 0x2c;
static-method int getBurnDuration(ItemInstance *item_instance) = 0xd33f8; static-method int getBurnDuration(const ItemInstance &item_instance) = 0xd33f8;
method int getLitProgress(int max) = 0xd3240; method int getLitProgress(int max) = 0xd3240;

View File

@ -3,7 +3,7 @@ vtable-size 0x28;
vtable 0x115d78; vtable 0x115d78;
constructor (int type) = 0xd2308; constructor (int type) = 0xd2308;
static-method void setId(int id, std::string *name) = 0xd26fc; static-method void setId(int id, const std::string &name) = 0xd26fc;
static-method void initTileEntities() = 0xd2834; static-method void initTileEntities() = 0xd2834;
virtual-method bool shouldSave() = 0x8; virtual-method bool shouldSave() = 0x8;

View File

@ -8,6 +8,6 @@ virtual-method void render(TileEntity *tileentity, float x, float y, float z, fl
virtual-method void onGraphicsReset() = 0xc; virtual-method void onGraphicsReset() = 0xc;
virtual-method void onNewLevel(Level *level) = 0x10; virtual-method void onNewLevel(Level *level) = 0x10;
method void bindTexture(std::string *file) = 0x67638; method void bindTexture(const std::string &file) = 0x67638;
property TileEntityRenderDispatcher *tileEntityRenderDispatcher = 0x4; property TileEntityRenderDispatcher *tileEntityRenderDispatcher = 0x4;