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

[BUG] Builder does not consume the correct amount of items #674

Open
4 of 5 tasks
natrow opened this issue Jun 4, 2024 · 3 comments
Open
4 of 5 tasks

[BUG] Builder does not consume the correct amount of items #674

natrow opened this issue Jun 4, 2024 · 3 comments
Assignees
Labels

Comments

@natrow
Copy link

natrow commented Jun 4, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest MineColonies Version?

  • I am running the latest beta version of MineColonies for my Minecraft version.

Did you check on the Wiki? or ask on Discord?

  • I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.

What were you playing at the time? Were you able to reproduce it in both settings?

  • Single Player
  • Multi Player

Minecraft Version

1.20.1

MineColonies Version

1.1.586-BETA

Structurize Version

1.0.733-RELEASE

Related Mods and their Versions

  1. Forge Version: 47.1.3 2. JEI Version: 15.2.0.21 3. BlockUI Version: 1.0.139-BETA 4. DO Version: 1.0.184-BETA

Note: I'm developing a custom compatibility mod, available at https://github.com/natrow/tfc_minecolonies/tree/1.20.1

Current Behavior

After registering a custom placement handler that requires an ItemStack with a non-one quantity, only a single item is consumed despite the builder (correctly) requesting all the items and the build screen showing all the required items.

Expected Behavior

All the required items should be consumed, not just a single one from the stack

Reproduction Steps

  1. Create and register a PlacementHandler
  2. Override the getRequiredItems() method to return an item stack with a quantity larger than one
  3. Create a build request that will use the affected PlacementHandler
  4. Observe that despite the builder requiring all of the items, only a single one is consumed

Logs

https://pastebin.com/a3hfXgKM

Anything else?

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
@natrow natrow added the Bug label Jun 4, 2024
@Raycoms
Copy link
Contributor

Raycoms commented Jun 4, 2024

Override the getRequiredItems() method to return an item stack with a quantity larger than one

Unfortunately you have to make this a list of itemstacks of size 1 atm

@Raycoms Raycoms transferred this issue from ldtteam/minecolonies Jun 4, 2024
@natrow
Copy link
Author

natrow commented Jun 4, 2024

Would it work if I just made several stacks of the same item instead?

Edit: this does work as a temporary workaround.

@Raycoms
Copy link
Contributor

Raycoms commented Jun 4, 2024 via email

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

No branches or pull requests

2 participants