Skip to content

Commit 47b8eac

Browse files
fix: red errors
1 parent 5494aff commit 47b8eac

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/client/java/com/tcm/MineTale/datagen/recipes/WorkbenchRecipes.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ public static void buildRecipes(RecipeProvider provider, RecipeOutput exporter,
7373
// .save(exporter, "workbench_hay_target");
7474

7575
// TODO: CRUDE_TORCH Not Implemented
76-
new WorkbenchRecipeBuilder(ModRecipes.WORKBENCH_TYPE, ModRecipes.WORKBENCH_SERIALIZER)
77-
.input(ModItems.PLANT_FIBER)
78-
.input(ModItems.TREE_SAP)
79-
.input(Items.STICK)
80-
.time(0.5)
81-
.output(ModBlocks.CRUDE_TORCH.asItem(), 4)
82-
.unlockedBy("has_furniture_workbench", provider.has(ModBlocks.WORKBENCH_WORKBENCH_BLOCK.asItem()))
83-
.bookCategory(ModRecipeDisplay.WORKBENCH_SEARCH)
84-
.save(exporter, "CRUDE_TORCH");
76+
// new WorkbenchRecipeBuilder(ModRecipes.WORKBENCH_TYPE, ModRecipes.WORKBENCH_SERIALIZER)
77+
// .input(ModItems.PLANT_FIBER)
78+
// .input(ModItems.TREE_SAP)
79+
// .input(Items.STICK)
80+
// .time(0.5)
81+
// .output(ModBlocks.CRUDE_TORCH.asItem(), 4)
82+
// .unlockedBy("has_furniture_workbench", provider.has(ModBlocks.WORKBENCH_WORKBENCH_BLOCK.asItem()))
83+
// .bookCategory(ModRecipeDisplay.WORKBENCH_SEARCH)
84+
// .save(exporter, "CRUDE_TORCH");
8585
}
8686
}

src/main/java/com/tcm/MineTale/block/workbenches/entity/AbstractWorkbenchEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public abstract class AbstractWorkbenchEntity extends BlockEntity implements Men
4242
// Slot Mapping: 0-1 Inputs, 2 Fuel, 3-6 Outputs
4343
protected final SimpleContainer inventory = new SimpleContainer(7);
4444
protected int progress = 0;
45-
protected int maxProgress = 200;
45+
protected float maxProgress = 200;
4646
protected boolean canPullFromNearby = false;
4747

4848
/**

src/main/java/com/tcm/MineTale/recipe/WorkbenchRecipe.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public record WorkbenchRecipe(
2929
List<Ingredient> ingredients,
3030
List<ItemStack> results,
31-
int cookTime,
31+
float cookTime,
3232
RecipeType<WorkbenchRecipe> recipeType,
3333
RecipeSerializer<WorkbenchRecipe> recipeSerializer,
3434
CraftingBookCategory category,
@@ -168,7 +168,7 @@ public Serializer(RecipeType<WorkbenchRecipe> recipeType) {
168168
this.codec = RecordCodecBuilder.mapCodec(inst -> inst.group(
169169
Ingredient.CODEC.listOf().fieldOf("ingredients").forGetter(WorkbenchRecipe::ingredients),
170170
ItemStack.STRICT_CODEC.listOf().fieldOf("results").forGetter(WorkbenchRecipe::results),
171-
Codec.INT.optionalFieldOf("cookTime", 200).forGetter(WorkbenchRecipe::cookTime),
171+
Codec.FLOAT.optionalFieldOf("cookTime", 200f).forGetter(WorkbenchRecipe::cookTime),
172172
CraftingBookCategory.CODEC.optionalFieldOf("category", CraftingBookCategory.MISC).forGetter(WorkbenchRecipe::category),
173173
Identifier.CODEC.fieldOf("book_category").forGetter(WorkbenchRecipe::bookCategory)
174174
).apply(inst, (ing, res, time, cat, book) ->
@@ -179,7 +179,7 @@ public Serializer(RecipeType<WorkbenchRecipe> recipeType) {
179179
this.streamCodec = StreamCodec.composite(
180180
Ingredient.CONTENTS_STREAM_CODEC.apply(ByteBufCodecs.list()), WorkbenchRecipe::ingredients,
181181
ItemStack.STREAM_CODEC.apply(ByteBufCodecs.list()), WorkbenchRecipe::results,
182-
ByteBufCodecs.VAR_INT.cast(), WorkbenchRecipe::cookTime,
182+
ByteBufCodecs.FLOAT.cast(), WorkbenchRecipe::cookTime,
183183
CraftingBookCategory.STREAM_CODEC.cast(), WorkbenchRecipe::category,
184184
Identifier.STREAM_CODEC.cast(), WorkbenchRecipe::bookCategory,
185185
(ing, res, time, cat, book) ->

0 commit comments

Comments
 (0)