A few QoL changes and fixes from hodgepodge #113
No reviewers
Labels
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: minecraft-pi-reborn/minecraft-pi-reborn#113
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "bigjango13/minecraft-pi-reborn:master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR has a few minor changes:
I also changed an int to a bool, which was likely left over from the C to C++ switch.
Overall, this looks pretty good. It just needs some minor changes.
@ -88,1 +90,4 @@
// 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 (!is_third_person) {
Couldn't you use
((Gui *) self)->minecraft->options.third_person
? AlsoGuiComponent_blit(self
should beself->blit(
.@ -747,0 +760,4 @@
}
Tile *Tile_init_invBedrock_injection(Tile *t) {
Tile *ret = Tile_init(t);
This should be
t->init()
.@ -747,0 +763,4 @@
Tile *ret = Tile_init(t);
// Fix invisible bedrock's name
std::string invBedrock = "invBedrock";
t->vtable->setDescriptionId(t, &invBedrock);
Remove the
->vtable->
.@ -747,0 +767,4 @@
return ret;
}
void copy_with_still(std::string *into, char *from) {
So, uh, what exactly are these functions? What do they do? What are the replacing? That should be a comment and/or in the function name.
@ -747,0 +780,4 @@
// Fix camera legs
void EntityRenderer_bindTexture_Camera_leg_injection(EntityRenderer *self, __attribute__((unused)) std::string *file) {
std::string camera = "item/camera.png";
EntityRenderer_bindTexture(self, &camera);
I know I'm being a bit of a broken record here, but this should be
self->bindTexture
.@ -747,0 +783,4 @@
EntityRenderer_bindTexture(self, &camera);
}
void render_camera_legs() {
This should be in the dedicated camera mod folder and under a feature flag.
@ -747,0 +787,4 @@
Tesselator *t = &Tesselator::instance;
constexpr float size = 0.45f;
Tesselator_vertexUV(t, -size, 0.5, -size, 0.75, 0.5);
This should be
t->vertexUV
.@ -747,0 +815,4 @@
}
// Fix grass_carried's bottom texture
static Tile_getTexture2_t CarriedTile_getTexture2 = NULL;
Use
overwrite_calls
, it bundles the original method for you.But I just want to overwrite
CarriedTile_getTexture2
, not allTile_getTexture2
?Then just
overwrite_calls(CarriedTile_getTexture2
. It seems to be a "real" method so it should be overwritable.@ -995,1 +1072,4 @@
}
// Fix/update lang strings
misc_run_on_language_setup(Language_injection);
The language fixes should be under a
Add Missing Language Strings
feature flag IMO (enabled by default).@ -996,0 +1087,4 @@
overwrite_call((void *) 0x65a08, (void *) render_camera_legs);
// Fix pigmen from burning in the sun
overwrite_call((void *) 0x89a1c, (void *) Zombie_aiStep_getBrightness_injection);
This should be under a feature flag.
@ -996,0 +1091,4 @@
// Fix grass_carried's bottom texture
CarriedTile_getTexture2 = *(__raw_Tile_getTexture2_t *) 0x1147c4;
patch_address((void *) 0x1147c4, (void *) CarriedTile_getTexture2_injection);
I'm not sure if this should be under a dedicated feature flag or not. I could be convinced either way.
I figure why not, the more the merrier and it doesn't have any major disadvantages.