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

fixes #7270 Deploying food may be missing particle, deploying bowl foods loses bowl #7288

Conversation

jetpacker06
Copy link
Contributor

Fixing two issues:
When a deployer deploys a food item of stack size 1, the particle is missing
When a deployer deploys a food with a craft remainder such as stews/soups, the remainder item vanishes.

first issue I already fixed. it was caused by the itemstack being passed through an eat() method which decremented it before retrieving the particle, so it was attempting to get a particle from an empty itemstack.

second issue WIP at the moment

@jetpacker06 jetpacker06 marked this pull request as draft January 14, 2025 02:13
@jetpacker06 jetpacker06 changed the title fix #7270 Deploying food may be missing particle, deploying bowl foods loses bowl fixes #7270 Deploying food may be missing particle, deploying bowl foods loses bowl Jan 14, 2025
@jetpacker06
Copy link
Contributor Author

Fixed second issue of #7270 by calling Item#finishUsingItem() instead of just eat(). If the item is stackable like a typical food, it makes the Player eat it and decrements the size. If it is an instance of BowlFoodItem or any other modded container food that overrides finishUsingItem, it makes the Player eat it and then converts the itemstack into its container item as specified by finishUsingItem.

@jetpacker06 jetpacker06 marked this pull request as ready for review January 14, 2025 03:41
@IThundxr
Copy link
Member

Thanks!

@IThundxr IThundxr merged commit 2cf08a1 into Creators-of-Create:mc1.20.1/dev Jan 27, 2025
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.

2 participants