Few more symbols and clean up "Disable Hostile AI In Creative Mode" #88

Manually merged
TheBrokenRail merged 8 commits from bigjango13/minecraft-pi-reborn:master into master 2024-02-16 04:06:55 +00:00
Contributor

I got a bunch of constructors and vtables from MobFactory

I got a bunch of constructors and vtables from `MobFactory`
bigjango13 added 1 commit 2024-02-08 22:31:38 +00:00
TheBrokenRail reviewed 2024-02-08 23:07:55 +00:00
@ -470,2 +469,4 @@
Entity *target = mob->vtable->findAttackTarget(mob);
// Check if hostile
if (mob->vtable->getCreatureBaseType(mob) != 1) {

What's the point of this check?

What's the point of this check?
Author
Contributor

It's called "Disable Hostile AI In Creative Mode", so I figured it should only be disabled for hostile mobs.

It's called "Disable Hostile AI In Creative Mode", so I figured it should only be disabled for *hostile* mobs.

It's less "disable AI for hostile mobs" and more "disable mobs attacking the player."

It's less "disable AI for hostile mobs" and more "disable mobs attacking the player."
Author
Contributor

But only hostile mobs attack the player.

But only hostile mobs attack the player.

Maybe change the comment to Do not modify AI of non-hostile mobs or similar.

Maybe change the comment to `Do not modify AI of non-hostile mobs` or similar.
Author
Contributor

Is Only modify the AI of monsters sufficient?

Is `Only modify the AI of monsters` sufficient?
bigjango13 marked this conversation as resolved
@ -33,3 +34,1 @@
property float head_height = 0x68;
property float hitbox_width = 0x6c;
property float hitbox_height = 0x70;
property AABB aabb = 0x50;

Should this be called hitbox?

Should this be called `hitbox`?
Author
Contributor

Good idea 👍

Good idea :+1:
bigjango13 marked this conversation as resolved
bigjango13 added 1 commit 2024-02-09 00:33:54 +00:00
bigjango13 added 1 commit 2024-02-12 07:30:02 +00:00
bigjango13 added 3 commits 2024-02-13 06:25:05 +00:00
bigjango13 force-pushed master from 64cb51e37c to 5efbb19bcc 2024-02-13 06:30:33 +00:00 Compare
bigjango13 force-pushed master from 5efbb19bcc to 64cb51e37c 2024-02-13 06:32:00 +00:00 Compare
TheBrokenRail reviewed 2024-02-13 23:38:21 +00:00
@ -833,2 +834,4 @@
overwrite_calls((void *) Player_stopUsingItem, (void *) Player_stopUsingItem_injection);
// Fix invalid ItemInHandRenderer texture cache
uchar cmp_r7_patch[] = {0x07, 0x00, 0x57, 0xe1}; // "cmp r7,r7"

Sorry if this sounds a bit nit-picky, but

uchar cmp_r7_patch[] = {0x07, 0x00, 0x57, 0xe1}; // "cmp r7,r7"

feels very much like

// set x to 1
int x = 1;

The description of the patch you gave on Discord would probably make a much better comment.

Sorry if this sounds a bit nit-picky, but ```c uchar cmp_r7_patch[] = {0x07, 0x00, 0x57, 0xe1}; // "cmp r7,r7" ``` feels very much like ```c // set x to 1 int x = 1; ``` The description of the patch you gave on Discord would probably make a much better comment.
Author
Contributor

I'm not sure what you mean, do you want me to remove the "cmp r7,r7" comment?

I'm not sure what you mean, do you want me to remove the "cmp r7,r7" comment?

Sorry, that was a bit vague.

I meant two things really:

  1. Add a more detailed comment explaining what the patch does (like the one in Discord). Instead of just Fix invalid ItemInHandRenderer texture cache.
  2. And cmp_r7_patch and moveq_r3_true_patch aren't the best name for patch variables IMO when the comment just repeats it later. For instance, other variables in the file are chest_model_patch and chest_color_patch. And yeah, this is very much a nitpick and something I am very much guilty of myself in MCPI-Reborn.

Also, this should probably be under a feature flag, but I can do that later.

Sorry, that was a bit vague. I meant two things really: 1. Add a more detailed comment explaining what the patch does (like the one in Discord). Instead of just `Fix invalid ItemInHandRenderer texture cache`. 2. And `cmp_r7_patch` and `moveq_r3_true_patch` aren't the best name for patch variables IMO when the comment just repeats it later. For instance, other variables in the file are `chest_model_patch` and `chest_color_patch`. And yeah, this is very much a nitpick and something I am very much guilty of myself in MCPI-Reborn. Also, this should probably be under a feature flag, but I can do that later.
bigjango13 added 1 commit 2024-02-15 07:50:35 +00:00
bigjango13 added 1 commit 2024-02-15 09:02:14 +00:00
TheBrokenRail manually merged commit 9556d13791 into master 2024-02-16 04:06:55 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: minecraft-pi-reborn/minecraft-pi-reborn#88
No description provided.