Fix grass_carried's bottom texture
This commit is contained in:
parent
0083cc6a65
commit
d69aeed538
|
@ -790,6 +790,7 @@ void copy_with_carried(std::string *into, char *from) {
|
|||
*into += "Carried";
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
@ -820,11 +821,19 @@ void render_camera_legs() {
|
|||
Tesselator_vertexUV(t, -size, 0.5, size, 1, 0.5);
|
||||
}
|
||||
|
||||
// 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 Tile_getTexture2_t CarriedTile_getTexture2 = NULL;
|
||||
static int CarriedTile_getTexture2_injection(Tile *self, int face, int metadata) {
|
||||
if (face == 0) return 2;
|
||||
return CarriedTile_getTexture2(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)) {
|
||||
|
@ -1092,4 +1101,8 @@ void init_misc() {
|
|||
|
||||
// Fix pigmen from burning in the sun
|
||||
overwrite_call((void *) 0x89a1c, (void *) Zombie_aiStep_getBrightness_injection);
|
||||
|
||||
// Fix grass_carried's bottom texture
|
||||
CarriedTile_getTexture2 = *(__raw_Tile_getTexture2_t *) 0x1147c4;
|
||||
patch_address((void *) 0x1147c4, (void *) CarriedTile_getTexture2_injection);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user