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

fix ic2 crops making any farmland trampleable #425

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

leumasme
Copy link
Contributor

Each IC2 plant can implement a onEntityCollision behavior for when it should be trampled.
By default, crops can be trampled by sprinting over it.
When an IC2 crop is trampled this way, it will set the block below it to dirt.
This is an issue, because it means that even farmland which shouldn't be tramplable (at least via the vanilla falling-onto-farmland mechanic) like Fertilized Dirt can be trampled and will be replaced with normal dirt (instead of the un-tilled fertilized dirt).

This fix just disables the ic2 crop trampling by sprinting for blocks that aren't normal farmland.
If there are any custom farmlands that should be able to be trampled, they can just be specially cased in the fix, but I'm not aware of any.

Could also be implemented by calling onFallenUpon when attempting to trample the crop to try to invoke its trampling-by-falling-onto behavior and avoid any special-casing, but not sure if that's a good idea; who knows what devs are using that method.

After running over some crops containing plants that can be trampled:
image

Fixes GTNewHorizons/GT-New-Horizons-Modpack#4571 and thus needs a quest update to this quest
image
( GTNewHorizons/GT-New-Horizons-Modpack#16658 )

@Dream-Master Dream-Master requested a review from a team September 24, 2024 18:20
@Dream-Master Dream-Master merged commit b3ac353 into GTNewHorizons:master Sep 24, 2024
1 check passed
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.

Ztones Garden Soil Turns to Dirt While Sprinting Across
3 participants