Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Bigjango13 | cfce26b3ba | |
Bigjango13 | 7566890c7c | |
Bigjango13 | d7c6771cdd | |
Bigjango13 | e03caceb6d | |
Bigjango13 | 2401fa3a6f | |
Bigjango13 | 0feef96eca | |
Bigjango13 | d9c25f22ad |
|
@ -1 +1 @@
|
|||
Subproject commit 67c4adaa772445f919f37131d7605bd374c67845
|
||||
Subproject commit db3879f7a51c5413e1c17e17cd6949d711132468
|
|
@ -5,9 +5,11 @@
|
|||
#include <libreborn/libreborn.h>
|
||||
#include <symbols/minecraft.h>
|
||||
|
||||
extern "C" {
|
||||
// Send API Command
|
||||
std::string chat_send_api_command(Minecraft *minecraft, std::string str);
|
||||
|
||||
// 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_handle_packet_send(Minecraft *minecraft, ChatPacket *packet);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
int compat_check_exit_requested();
|
||||
void compat_request_exit();
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
int creative_is_restricted();
|
||||
extern "C" {
|
||||
int creative_is_restricted();
|
||||
}
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
#include <libreborn/libreborn.h>
|
||||
|
||||
extern "C" {
|
||||
bool _feature_has(const char *name);
|
||||
}
|
||||
|
||||
#ifdef MCPI_SERVER_MODE
|
||||
#define _feature_has__server_defaul_is_server_disabled(name) 0
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
char *home_get();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <libreborn/libreborn.h>
|
||||
|
||||
extern "C" {
|
||||
void run_tests();
|
||||
void init_version();
|
||||
void init_compat();
|
||||
|
@ -31,4 +32,5 @@ void init_options();
|
|||
void init_chat();
|
||||
void init_bucket();
|
||||
void init_cake();
|
||||
void init_home();
|
||||
void init_home();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <symbols/minecraft.h>
|
||||
|
||||
extern "C" {
|
||||
typedef void (*input_tick_function_t)(Minecraft *minecraft);
|
||||
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_mouse_grab_state(int state);
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <symbols/minecraft.h>
|
||||
|
||||
extern "C" {
|
||||
int32_t misc_get_real_selected_slot(Player *player);
|
||||
|
||||
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
|
||||
|
||||
extern bool is_in_chat;
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
char *override_get_path(const char *filename);
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
void screenshot_take(char *home);
|
||||
}
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
#include "server_properties.h"
|
||||
|
||||
extern "C" {
|
||||
ServerProperties &get_server_properties();
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
void sign_key_press(char key);
|
||||
extern "C" {
|
||||
void sign_key_press(char key);
|
||||
}
|
|
@ -2,4 +2,6 @@
|
|||
|
||||
#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);
|
||||
}
|
|
@ -3,4 +3,6 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
void title_screen_load_splashes(std::vector<std::string> &splashes);
|
||||
}
|
|
@ -3,4 +3,6 @@
|
|||
#include <symbols/minecraft.h>
|
||||
|
||||
extern int touch_gui;
|
||||
extern "C" {
|
||||
Button *touch_create_button(int id, std::string text);
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
extern "C" {
|
||||
char *version_get();
|
||||
}
|
|
@ -73,8 +73,10 @@ set(SRC
|
|||
src/level/LevelSource.def
|
||||
src/level/ExternalFileLevelStorageSource.def
|
||||
src/level/Biome.def
|
||||
src/level/LevelChunk.def
|
||||
src/level/ChunkSource.def
|
||||
src/level/ChunkCache.def
|
||||
src/level/ChunkStorage.def
|
||||
src/level/LightLayer.def
|
||||
src/level/Level.def
|
||||
src/level/LevelRenderer.def
|
||||
|
@ -97,6 +99,7 @@ set(SRC
|
|||
src/item/ArmorMaterial.def
|
||||
src/item/ArmorItem.def
|
||||
src/item/TileItem.def
|
||||
src/item/TilePlanterItem.def
|
||||
src/item/FoodItem.def
|
||||
src/item/DiggerItem.def
|
||||
src/api/OffsetPosTranslator.def
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
vtable 0x10a548;
|
||||
|
||||
virtual-method void remove() = 0x10;
|
||||
// The difference between move and moveTo is that move is relative and moveTo is absolute
|
||||
virtual-method void move(float xo, float yo, float zo) = 0x18;
|
||||
virtual-method void moveTo(float x, float y, float z, float yaw, float pitch) = 0x1c;
|
||||
virtual-method void tick() = 0x34;
|
||||
virtual-method float getBrightness(float param_1) = 0x64;
|
||||
virtual-method bool interact(Player *with) = 0x6c;
|
||||
|
@ -17,8 +20,6 @@ virtual-method bool isHangingEntity() = 0xf0;
|
|||
// The owner entity id for arrows/throwables, else 0
|
||||
virtual-method int getAuxData() = 0xf4;
|
||||
|
||||
method void moveTo(float x, float y, float z, float yaw, float pitch) = 0x7a834;
|
||||
|
||||
property float x = 0x4;
|
||||
property float y = 0x8;
|
||||
property float z = 0xc;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
extends Item;
|
||||
extends TileItem;
|
||||
|
||||
vtable 0x114a58;
|
||||
|
||||
vtable-size 0x98;
|
||||
size 0x2c;
|
||||
|
||||
property Tile *icon_tile = 0x28;
|
||||
|
|
|
@ -3,3 +3,7 @@ static-method void renderGuiItem_two(Font *font, Textures *textures, ItemInstanc
|
|||
static-method void renderGuiItemCorrect(Font *font, Textures *textures, ItemInstance *item_instance, int x, int y) = 0x639a0;
|
||||
static-method void renderGuiItemDecorations(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;
|
||||
|
||||
// This doesn't include things that it doesn't need for item renderering (like the level)
|
||||
// So if you are (ab)using it for something else, be sure to set what you need
|
||||
static-property TileRenderer *tileRenderer = 0x137c18;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
extends Item;
|
||||
|
||||
vtable 0x114cd8;
|
||||
vtable-size 0x98;
|
||||
size 0x2c;
|
||||
|
||||
constructor (int id) = 0xce3a4;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
extends Item;
|
||||
|
||||
size 0x28;
|
||||
vtable 0x10ecb0;
|
||||
|
||||
property int tile_id = 0x24;
|
|
@ -1,3 +1,12 @@
|
|||
extends ChunkSource;
|
||||
|
||||
vtable 0x10fbc0;
|
||||
|
||||
property int cachedX = 0x8;
|
||||
property int cachedZ = 0xc;
|
||||
property LevelChunk *emptyChunk = 0x10;
|
||||
property ChunkSource *chunkSource = 0x14;
|
||||
property ChunkStorage *chunkStorage = 0x18;
|
||||
property LevelChunk *levelChunks[256] = 0x1c;
|
||||
property Level *level = 0x41c;
|
||||
property LevelChunk *cachedLevelChunk = 0x420;
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
vtable 0x10fb88;
|
||||
|
||||
virtual-method bool hasChunk(int chunk_x, int chunk_z) = 0x8;
|
||||
virtual-method LevelChunk *getChunk(int chunk_x, int chunk_z) = 0xc;
|
||||
virtual-method LevelChunk *create(int chunk_x, int chunk_z) = 0x10;
|
||||
virtual-method void postProcess(ChunkSource *chunk_source, int chunk_x, int chunk_y) = 0x14;
|
||||
virtual-method bool tick() = 0x18;
|
||||
virtual-method bool shouldSave() = 0x1c;
|
||||
// If unforced is false, chunk->shouldSave will be ignored
|
||||
virtual-method void saveAll(bool unforced) = 0x20;
|
||||
//virtual-method std::vector<???> getMobsAt(?? *?, int x, int y, int z) = 0x24;
|
||||
virtual-method std::string gatherStats() = 0x28;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
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 saveEntities(Level *level, LevelChunk *level_chunk) = 0x10;
|
||||
virtual-method void saveAll(Level *level, std::vector<LevelChunk *> *level_chunks) = 0x14;
|
||||
virtual-method void tick() = 0x18;
|
||||
virtual-method void flush() = 0x1c;
|
|
@ -4,8 +4,17 @@ vtable 0x10fcf0;
|
|||
|
||||
method void saveLevelData() = 0xa2e94;
|
||||
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 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 setTileAndDataNoUpdate(int x, int y, int z, int id, int data) = 0xa33d0;
|
||||
// Calls setTileDirty and updateNearbyTiles
|
||||
method void tileUpdated(int x, int y, int z, int id) = 0xa387c;
|
||||
method void setTileDirty(int x, int y, int z) = 0xa3508;
|
||||
// Calls neighborChanged for all adjacent tiles
|
||||
method void updateNearbyTiles(int x, int y, int z, int id) = 0xa36cc;
|
||||
method void neighborChanged(int x, int y, int z, int id) = 0xa3658;
|
||||
// clip_liquids and clip_hitboxes default to true
|
||||
// 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;
|
||||
|
@ -29,6 +38,7 @@ method TileEntity *getTileEntity(int x, int y, int z) = 0xa55d4;
|
|||
method void setTileEntity(int x, int y, int z, TileEntity *tileEntity) = 0xa7b58;
|
||||
method void removeTileEntity(int x, int y, int z) = 0xa7aac;
|
||||
method void animateTick(int x, int y, int z) = 0xa5920;
|
||||
method void addToTickNextTick(int x, int y, int z, int id, int delay) = 0xa7428;
|
||||
// Called by trapdoors, doors, and tnt
|
||||
method bool hasNeighborSignal(int x, int y, int z) = 0xa5f08;
|
||||
// Called by hasNeighborSignal
|
||||
|
@ -42,7 +52,11 @@ virtual-method void tick() = 0x28;
|
|||
virtual-method void updateSleepingPlayerList() = 0x2c;
|
||||
virtual-method ChunkCache *createChunkSource() = 0x30;
|
||||
|
||||
property bool is_client_side = 0x11;
|
||||
property bool done_generating = 0x12;
|
||||
property std::vector<Entity *> entities = 0x20;
|
||||
property std::vector<TileEntity *> tileentities = 0x50;
|
||||
property std::vector<Player *> players = 0x60;
|
||||
property bool no_update = 0x70;
|
||||
property ChunkSource *chunk_source = 0xa5c;
|
||||
property LevelData data = 0xa64;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
vtable 0x110268;
|
|
@ -1 +1,5 @@
|
|||
method int getTime() = 0xba970;
|
||||
method void setTime(int time) = 0xbab28;
|
||||
method uint getSpawnMobs() = 0xbabec;
|
||||
|
||||
property int time = 0x68;
|
||||
|
|
|
@ -3,6 +3,7 @@ virtual-method bool isSolid() = 0x8;
|
|||
// Globals
|
||||
static-property Material *dirt = 0x180a94;
|
||||
static-property Material *stone = 0x180a9c;
|
||||
static-property Material *wood = 0x180a98;
|
||||
static-property Material *metal = 0x180aa0;
|
||||
static-property Material *plant = 0x180ab0;
|
||||
static-property Material *glass = 0x180acc;
|
||||
|
|
|
@ -18,6 +18,8 @@ virtual-method int getTexture1() = 0x28;
|
|||
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 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
|
||||
virtual-method void addAABBs(Level *level, int x, int y, int z, AABB *intersecting, std::vector<AABB> *aabbs) = 0x38;
|
||||
virtual-method bool isSolidRender() = 0x40;
|
||||
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;
|
||||
|
@ -68,7 +70,7 @@ property AABB aabb = 0x40;
|
|||
|
||||
// Globals, all of theses are 256 elements long
|
||||
static-property-array Tile *tiles = 0x180e08;
|
||||
static-property-array float lightEmission = 0x181214;
|
||||
static-property-array int lightEmission = 0x181214;
|
||||
static-property-array bool isEntityTile = 0x181f20;
|
||||
|
||||
// Tiles
|
||||
|
|
|
@ -8,5 +8,6 @@ method bool tesselateBlockInWorld(Tile *tile, int x, int y, int z) = 0x59e30;
|
|||
method bool tesselateInWorld(Tile *tile, int x, int y, int z) = 0x5e80c;
|
||||
method void renderGuiTile(Tile *tile, int aux) = 0x5ad0c;
|
||||
method void renderTile(Tile *tile, int data) = 0x5dcb0;
|
||||
method void tesselateTorch(Tile *tile, float x, float y, float z, float top_x, float top_z) = 0x54254;
|
||||
|
||||
property LevelSource *level = 0x0;
|
||||
|
|
|
@ -8,4 +8,6 @@ virtual-method void render(TileEntity *tileentity, float x, float y, float z, fl
|
|||
virtual-method void onGraphicsReset() = 0xc;
|
||||
virtual-method void onNewLevel(Level *level) = 0x10;
|
||||
|
||||
method void bindTexture(std::string *file) = 0x67638;
|
||||
|
||||
property TileEntityRenderDispatcher *tileEntityRenderDispatcher = 0x4;
|
||||
|
|
Loading…
Reference in New Issue