DragonsPlusMinecraft / CreateCentralKitchen

An add-on for Create, offering more tools and methods to automate food processing of other mod.
https://modrinth.com/mod/create-central-kitchen
MIT License
24 stars 12 forks source link

Add an option to allow harvesting mushroom colony only reduces colony size. #82

Open MarioSMB opened 8 months ago

MarioSMB commented 8 months ago

Minecraft Version

1.20.1

Describe the Bug

The mechanical harvester is picking up the entire mushroom colony and replanting it, this is unexpected behaviour as using shears on a colony will take a mushroom off it and reduce its size.

Reproduction Steps

N/A

Expected Result

Using a mechanical harvester on mushroom colonies should harvest mushrooms, not the colony item itself.

Screenshots and Videos

No response

Crash Report or Log

No response

Other Mods

No response

Mod Version

1.3.10

Forge Version

47.2.20

MarioSMB commented 8 months ago

Additionally, the re-planting of colonies means it is creating a mushroom out of nowhere (a full colony is taken, it takes a mushroom to create a colony).

MarbleGateKeeper commented 8 months ago

Well I confirm that it's not a bug. It's intended behavior. I designed that, and I do think it's logical since when harvester is replanting other plants, it also creates a seed out of nowhere.

MarioSMB commented 8 months ago

I have to disagree - most crops do drop their seeds, but when you harvest a mushroom colony you snip a few mushrooms off to let it regrow.
Giving the entire colony is extremely strange and doesn't match the behaviour of other methods (dispenser/deployer harvesting mushroom colonies). It is usually something the player does explicitly to move the colony elsewhere, as it is not generally used in any recipes.

At the very least, an option to have it perform the expected behaviour would be appreciated.

EDIT: Not only that, but you have to explicitly break the colony with shears to not be given mushrooms. It really is bizarre to drop the colony with harvesters!

MarbleGateKeeper commented 8 months ago

I have to disagree - most crops do drop their seeds, but when you harvest a mushroom colony you snip a few mushrooms off to let it regrow. Giving the entire colony is extremely strange and doesn't match the behaviour of other methods (dispenser/deployer harvesting mushroom colonies). It is usually something the player does explicitly to move the colony elsewhere, as it is not generally used in any recipes.

Sorry, I didn't specify it clearly: In underneath code implementation of harvesting other crops, replanted seed does come out of nowhere. So I follow that "rule".

At the very least, an option to have it perform the expected behaviour would be appreciated.

I'll add a option for that.

MarioSMB commented 8 months ago

Thank you for reconsidering, the option will be greatly appreciated.

MarioSMB commented 8 months ago

Pardon the bump, it just occurred to me that there's a vanilla example of this in the form of berry bushes;

When a harvester goes over a berry bush it performs the right-click action to gather a handful of berries, resetting the berry bush back to an "empty" state. It does not break the berry bush.
Likewise, when you perform a right-click action on a mushroom colony it provides a handful of mushrooms and resets the mushroom colony back to a "small" state, however it requires you to be holding shears to do so.

The need for shears is the sole reason harvesters do not support mushroom colonies out of the box, and if they did they would harvest some mushrooms instead of the colony, as that is the pre-existing design and logic to follow.

I hope that makes some sense and helps with your decision here, either way I look forward to having the option! Thank you.

RaymondBlaze commented 7 months ago

I'm afraid mushroom colonies are not the same as sweet berries. The sweet berry plant itself as an item is the sweet berry item, but that's not true for mushroom colonies, a grown mushroom colony as an item is the mushroom colony instead of the corresponding mushroom. That is, grown mushroom colony is unique and should be treated differently from the growing ones.

Actually, setting Create's option harvestPartial to true will allow the colony to be harvested before fully grown and drop mushrooms. However, that option will completely break the harvester's interaction with other crops, which means your suggested option is a better choice.

As for the current behavior, the mushroom colony item is used in Farmer's Delight as a food ingredient, so there's a need to provide ways to automatically harvest them, so the current behavior should be used as default even with the new option.

I'll see if I can make it so the harvester harvest the colony as a whole only when it got mushroom in the inventory to replant the colony, so we can have both behaviors at the same time instead of having to pick one of them for the whole game. Don't worry, the option will be added anyways, as requested.