Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
8cd674004f | ||
|
ec0dd41b46 | ||
|
438865c76a | ||
|
0843fc3741 | ||
|
a15447b232 | ||
|
d69aeed538 | ||
|
0083cc6a65 | ||
|
fb14444dba | ||
|
61a4b203b5 |
|
@ -68,4 +68,7 @@ TRUE Fix Held Item Caching
|
|||
TRUE Add Reborn Info To Options
|
||||
FALSE Log FPS
|
||||
TRUE Add Welcome Screen
|
||||
TRUE Add Missing Language Strings
|
||||
TRUE Fix Pigmen Burning In The Sun
|
||||
TRUE Fix Grass's Bottom Texture
|
||||
TRUE F3 Debug Information
|
|
@ -30,6 +30,37 @@ static void TripodCamera_tick_Level_addParticle_call_injection(Level *level, std
|
|||
level->addParticle(particle, x, y + 0.5, z, deltaX, deltaY, deltaZ, count);
|
||||
}
|
||||
|
||||
// Fix camera legs
|
||||
void EntityRenderer_bindTexture_Camera_leg_injection(EntityRenderer *self, __attribute__((unused)) std::string *file) {
|
||||
std::string camera = "item/camera.png";
|
||||
self->bindTexture(&camera);
|
||||
}
|
||||
|
||||
void render_camera_legs() {
|
||||
Tesselator *t = &Tesselator::instance;
|
||||
constexpr float size = 0.45f;
|
||||
|
||||
t->vertexUV(-size, 0.5, -size, 0.75, 0.5);
|
||||
t->vertexUV(-size, -0.5, -size, 0.75, 1 );
|
||||
t->vertexUV( size, -0.5, size, 1, 1 );
|
||||
t->vertexUV( size, 0.5, size, 1, 0.5);
|
||||
|
||||
t->vertexUV( size, 0.5, size, 0.75, 0.5);
|
||||
t->vertexUV( size, -0.5, size, 0.75, 1 );
|
||||
t->vertexUV(-size, -0.5, -size, 1, 1 );
|
||||
t->vertexUV(-size, 0.5, -size, 1, 0.5);
|
||||
|
||||
t->vertexUV(-size, 0.5, size, 0.75, 0.5);
|
||||
t->vertexUV(-size, -0.5, size, 0.75, 1 );
|
||||
t->vertexUV( size, -0.5, -size, 1, 1 );
|
||||
t->vertexUV( size, 0.5, -size, 1, 0.5);
|
||||
|
||||
t->vertexUV( size, 0.5, -size, 0.75, 0.5);
|
||||
t->vertexUV( size, -0.5, -size, 0.75, 1 );
|
||||
t->vertexUV(-size, -0.5, size, 1, 1 );
|
||||
t->vertexUV(-size, 0.5, size, 1, 0.5);
|
||||
}
|
||||
|
||||
// Init
|
||||
void init_camera() {
|
||||
// Implement AppPlatform_linux::saveScreenshot So Cameras Work
|
||||
|
@ -41,5 +72,8 @@ void init_camera() {
|
|||
overwrite_calls(EntityRenderDispatcher_constructor, EntityRenderDispatcher_injection);
|
||||
// Display Smoke From TripodCamera Higher
|
||||
overwrite_call((void *) 0x87dc4, (void *) TripodCamera_tick_Level_addParticle_call_injection);
|
||||
// Fix camera legs
|
||||
overwrite_call((void *) 0x659dc, (void *) EntityRenderer_bindTexture_Camera_leg_injection);
|
||||
overwrite_call((void *) 0x65a08, (void *) render_camera_legs);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ static void revert_rotation(Entity *entity) {
|
|||
entity->old_pitch = -entity->old_pitch;
|
||||
}
|
||||
}
|
||||
static int is_front_facing = 0;
|
||||
static bool is_front_facing = false;
|
||||
static LocalPlayer *stored_player = nullptr;
|
||||
static void GameRenderer_setupCamera_injection(GameRenderer_setupCamera_t original, GameRenderer *game_renderer, float param_1, int param_2) {
|
||||
// Get Objects
|
||||
|
@ -86,6 +86,13 @@ static void ParticleEngine_render_injection(ParticleEngine_render_t original, Pa
|
|||
}
|
||||
}
|
||||
|
||||
// Hide crosshairs in 3rd person mode
|
||||
static void Gui_renderProgressIndicator_GuiComponent_blit_injection(GuiComponent *self, int x1, int y1, int x2, int y2, int w1, int h1, int w2, int h2) {
|
||||
if (((Gui *) self)->minecraft->options.third_person != 0) {
|
||||
self->blit(x1, y1, x2, y2, w1, h1, w2, h2);
|
||||
}
|
||||
}
|
||||
|
||||
// Init
|
||||
void _init_toggle() {
|
||||
if (feature_has("Bind Common Toggleable Options To Function Keys", server_disabled)) {
|
||||
|
@ -96,4 +103,7 @@ void _init_toggle() {
|
|||
overwrite_calls(GameRenderer_setupCamera, GameRenderer_setupCamera_injection);
|
||||
overwrite_calls(ParticleEngine_render, ParticleEngine_render_injection);
|
||||
}
|
||||
|
||||
// Hide crosshair in 3rd person
|
||||
overwrite_call((void *) 0x261b8, (void *) Gui_renderProgressIndicator_GuiComponent_blit_injection);
|
||||
}
|
||||
|
|
|
@ -736,6 +736,47 @@ static std::string AppPlatform_linux_getDateString_injection(__attribute__((unus
|
|||
template <typename... Args>
|
||||
static void nop(__attribute__((unused)) Args... args) {
|
||||
}
|
||||
|
||||
static void Language_injection() {
|
||||
// Fix language strings
|
||||
I18n::_strings.insert(std::make_pair("tile.waterStill.name", "Still Water"));
|
||||
I18n::_strings.insert(std::make_pair("tile.lavaStill.name", "Still Lava"));
|
||||
I18n::_strings.insert(std::make_pair("tile.grassCarried.name", "Carried Grass"));
|
||||
I18n::_strings.insert(std::make_pair("tile.leavesCarried.name", "Carried Leaves"));
|
||||
I18n::_strings.insert(std::make_pair("tile.invBedrock.name", "Invisible Bedrock"));
|
||||
// Missing language strings
|
||||
I18n::_strings.insert(std::make_pair("item.camera.name", "Camera"));
|
||||
I18n::_strings.insert(std::make_pair("item.seedsMelon.name", "Melon Seeds"));
|
||||
I18n::_strings.insert(std::make_pair("tile.pumpkinStem.name", "Pumpkin Stem"));
|
||||
I18n::_strings.insert(std::make_pair("tile.stoneSlab.name", "Double Stone Slab"));
|
||||
}
|
||||
|
||||
Tile *Tile_init_invBedrock_injection(Tile *t) {
|
||||
Tile *ret = t->init();
|
||||
// Fix invisible bedrock's name
|
||||
std::string invBedrock = "invBedrock";
|
||||
t->setDescriptionId(&invBedrock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// For language fixes, adds a "Still" prefix for liquids
|
||||
void copy_with_still(std::string *into, char *from) {
|
||||
*into = from;
|
||||
*into += "Still";
|
||||
}
|
||||
|
||||
// Fix pigmen burning in the sun
|
||||
static float Zombie_aiStep_getBrightness_injection(Entity *self, float param_1) {
|
||||
if (self->getEntityTypeId() == 36) return 0;
|
||||
return self->getBrightness(param_1);
|
||||
}
|
||||
|
||||
// Fix grass_carried's bottom texture
|
||||
static int CarriedTile_getTexture2_injection(CarriedTile_getTexture2_t original, CarriedTile *self, int face, int metadata) {
|
||||
if (face == 0) return 2;
|
||||
return original(self, face, metadata);
|
||||
}
|
||||
|
||||
void init_misc() {
|
||||
// Remove Invalid Item Background (A Red Background That Appears For Items That Are Not Included In The gui_blocks Atlas)
|
||||
if (feature_has("Remove Invalid Item Background", server_disabled)) {
|
||||
|
@ -985,4 +1026,27 @@ void init_misc() {
|
|||
overwrite_calls(Gui_onConfigChanged, nop<Gui_onConfigChanged_t, Gui *, Config *>);
|
||||
overwrite_calls(LevelRenderer_generateSky, nop<LevelRenderer_generateSky_t, LevelRenderer *>);
|
||||
}
|
||||
|
||||
// Fix/update lang strings
|
||||
if (feature_has("Add Missing Language Strings", server_disabled)) {
|
||||
misc_run_on_language_setup(Language_injection);
|
||||
}
|
||||
// Water/lava flowing lang
|
||||
overwrite_call((void *) 0xc3b54, (void *) copy_with_still);
|
||||
overwrite_call((void *) 0xc3c7c, (void *) copy_with_still);
|
||||
// Carried tile lang
|
||||
patch_address((void *) 0xc6674, (void *) "grassCarried");
|
||||
patch_address((void *) 0xc6684, (void *) "leavesCarried");
|
||||
// InvBedrock lang
|
||||
overwrite_call((void *) 0xc5f04, (void *) Tile_init_invBedrock_injection);
|
||||
|
||||
// Fix pigmen from burning in the sun
|
||||
if (feature_has("Fix Pigmen Burning In The Sun", server_enabled)) {
|
||||
overwrite_call((void *) 0x89a1c, (void *) Zombie_aiStep_getBrightness_injection);
|
||||
}
|
||||
|
||||
// Fix grass_carried's bottom texture
|
||||
if (feature_has("Fix Grass's Bottom Texture", server_disabled)) {
|
||||
overwrite_calls(CarriedTile_getTexture2, CarriedTile_getTexture2_injection);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,6 +149,7 @@ set(SRC
|
|||
src/tile/StemTile.def
|
||||
src/tile/Tile_SoundType.def
|
||||
src/tile/TileRenderer.def
|
||||
src/tile/CarriedTile.def
|
||||
src/tile/GrassTile.def
|
||||
src/tile/HeavyTile.def
|
||||
src/tile/EntityTile.def
|
||||
|
|
3
symbols/src/tile/CarriedTile.def
Normal file
3
symbols/src/tile/CarriedTile.def
Normal file
|
@ -0,0 +1,3 @@
|
|||
extends Tile;
|
||||
|
||||
vtable 0x114798;
|
Loading…
Reference in New Issue
Block a user