Create Slice & Dice

Create Slice & Dice

27M Downloads

No secondary outputs

scarredred opened this issue ยท 7 comments

commented

What happened?

When using the slicer to process items that have secondary outputs, only the primary is returned.

For example, adding farmer's delight rice panicle to the basin using a knife on the slicer, only rice is returned. JEI indicates that both rice and straw are retuned, which is the same behaviour as the cutting board, but only one is with the slicer.

Another example is adding Extra Delight cinnamon logs to the basin with an axe on the slicer, only stripped logs are returned, and not the cinnamon bark which is the key ingredient that needs to be returned. Again JEI is showing the expected behaviour.

Loader

neoforge

Mod Version

4.0.1

Minecraft Version

1.21

Relevant log output

commented

Are you processing on the basin, belt or depot?

commented

I was using the basin.

I've tested it now with a depot and that seems to work ok.

commented

Same problem here : using bassin and axe to process bamboo block.
No secondary outputs, despite JEI saying it should.

Image
commented

Thanks for testing it, yes I have to admit I never tested anything with secondary outputs, since most recipes have only one.
Will be fixed in the next release but cannot promise a date right now

commented

Same problem, no tree bark of Farmer's Delight when process log

commented

I think I understand precisely where the issue is coming from.

Create's BasinRecipe::apply() defaults to a crafting-like behavior when given a recipe that is not a BasinRecipe which unfortunatelyCuttingProcessingRecipe isn't.

Modifying this method in Create itself as follows fixes the problem.

  • Before :
public class BasinRecipe extends StandardProcessingRecipe<RecipeInput> {
  private static boolean apply(BasinBlockEntity basin, Recipe<?> recipe, boolean test) {
    //...
      if (recipe instanceof BasinRecipe basinRecipe) {
  • After:
public class BasinRecipe extends StandardProcessingRecipe<RecipeInput> {
  private static boolean apply(BasinBlockEntity basin, Recipe<?> recipe, boolean test) {
    //...
      if (recipe instanceof ProcessingRecipe<?,?> processingRecipe) {
	var basinRecipe = (ProcessingRecipe<RecipeInput,?>) processingRecipe;

Not sure if such a change would be harmless or risky on Create's side, nor what could be an alternative, less intrusive, more controled way to fix this locally.

  • Maybe using a Mixin to inject into BasinRecipe::apply() the specific CuttingProcessingRecipe case only ?
  • Maybe deriving CuttingProcessingRecipe from BasinRecipe (might be cleaner if feasible) ?
commented

Maybe deriving CuttingProcessingRecipe from BasinRecipe

This might be facilitated in the future by #9066 ?