Skip to content

Commit

Permalink
fix(1.21.2): Set correct recipe book category for market recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Oct 20, 2024
1 parent 4957e21 commit 81b6f90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public PlacementInfo placementInfo() {

@Override
public RecipeBookCategory recipeBookCategory() {
return RecipeBookCategories.CAMPFIRE;
return ModRecipes.marketRecipeBookCategory;
}

public Optional<Payment> getPayment() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.blay09.mods.balm.api.recipe.BalmRecipes;
import net.blay09.mods.farmingforblockheads.FarmingForBlockheads;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.crafting.RecipeBookCategories;
import net.minecraft.world.item.crafting.RecipeBookCategory;
import net.minecraft.world.item.crafting.RecipeSerializer;
import net.minecraft.world.item.crafting.RecipeType;
Expand All @@ -12,11 +13,13 @@ public class ModRecipes {
public static final String MARKET_RECIPE_GROUP = "market";
public static final ResourceLocation MARKET_RECIPE_TYPE = ResourceLocation.fromNamespaceAndPath(FarmingForBlockheads.MOD_ID, MARKET_RECIPE_GROUP);

public static RecipeBookCategory marketRecipeBookCategory;
public static RecipeType<MarketRecipe> marketRecipeType;
public static RecipeSerializer<MarketRecipe> marketRecipeSerializer;

public static void initialize(BalmRecipes registry) {
registry.registerRecipeBookCategory(RecipeBookCategory::new, ResourceLocation.fromNamespaceAndPath(FarmingForBlockheads.MOD_ID, "market"));
registry.registerRecipeBookCategory(() -> marketRecipeBookCategory = new RecipeBookCategory(),
ResourceLocation.fromNamespaceAndPath(FarmingForBlockheads.MOD_ID, "market"));
registry.registerRecipeDisplayType(() -> MarketRecipeDisplay.TYPE, ResourceLocation.fromNamespaceAndPath(FarmingForBlockheads.MOD_ID, "market"));
registry.registerRecipeType(() -> marketRecipeType = new RecipeType<>() {
@Override
Expand Down

0 comments on commit 81b6f90

Please sign in to comment.