Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added growth of baby animals when crouching and hold sneak to continuous crop growth #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Satork
Copy link

@Satork Satork commented Jul 15, 2022

  • Added the ability so when players sneak around baby animals, accelerate/bonemeal their growth.
  • Added hold-crouch feature for 1.16.5

TODO:

  • Add Config to hold-crouch method
  • Add hold-crouch timer before starting bonemeal

BUGS:

  • Sugarcane wont get re-bonemealed when holding crouch. Player needs to repeatly press and release crouch key to grow sugarcane. Possible issue with mods tweaking sugarcane height grow limit.

While holding the sneak key, the player will continue bonemealing the crops/saplings around it
for (int y = -2; y <= 2; y++)
for (int z = -TwerkConfig.effectRadius; z <= TwerkConfig.effectRadius; z++) {
List<AgeableEntity> posEntitiesList =
world.getEntitiesWithinAABB(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just use an AxisAlignedBB for the whole area instead of block by block. This can replace your whole method.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested yet, but could work as well.
I thought of block by block because inside a same block ther can be multiple entities.
All in all, this is my first attempt at modding Minecraft. I am still adapting to the API. Any suggestions are welcome of course

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants