Update CrushingRecipe.java

This commit is contained in:
Mrbysco 2024-03-04 22:52:10 +01:00
parent 50407e9524
commit 02a6918267

View file

@ -108,7 +108,7 @@ public class CrushingRecipe implements Recipe<Container> {
public static class Serializer implements RecipeSerializer<CrushingRecipe> { public static class Serializer implements RecipeSerializer<CrushingRecipe> {
private static final Codec<CrushingResult> RESULT_CODEC = RecordCodecBuilder.create( private static final Codec<CrushingResult> RESULT_CODEC = RecordCodecBuilder.create(
instance -> instance.group( instance -> instance.group(
ItemStack.ITEM_WITH_COUNT_CODEC.fieldOf("result").forGetter(result -> result.stack), ItemStack.CODEC.fieldOf("result").forGetter(result -> result.stack),
Codec.FLOAT.optionalFieldOf("chance", 1.0F).forGetter(recipe -> recipe.chance) Codec.FLOAT.optionalFieldOf("chance", 1.0F).forGetter(recipe -> recipe.chance)
) )
.apply(instance, CrushingResult::new) .apply(instance, CrushingResult::new)