-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56647bc
commit 2452c7f
Showing
7 changed files
with
98 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
- Updated to Minecraft 1.21.1 | ||
- Added bonemeal items to c:fertilizers tag | ||
- Updated to Minecraft 1.21.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 33 additions & 23 deletions
56
fabric/src/main/java/net/blay09/mods/fertilization/fabric/datagen/ModRecipeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,56 @@ | ||
package net.blay09.mods.fertilization.fabric.datagen; | ||
|
||
import net.blay09.mods.fertilization.Fertilization; | ||
import net.blay09.mods.fertilization.item.ModItems; | ||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; | ||
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider; | ||
import net.minecraft.core.HolderLookup; | ||
import net.minecraft.data.recipes.RecipeCategory; | ||
import net.minecraft.data.recipes.RecipeOutput; | ||
import net.minecraft.data.recipes.RecipeProvider; | ||
import net.minecraft.tags.ItemTags; | ||
import net.minecraft.world.item.Items; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
import static net.minecraft.data.recipes.ShapedRecipeBuilder.shaped; | ||
|
||
public class ModRecipeProvider extends FabricRecipeProvider { | ||
public ModRecipeProvider(FabricDataOutput output, CompletableFuture<HolderLookup.Provider> provider) { | ||
super(output, provider); | ||
} | ||
|
||
@Override | ||
public void buildRecipes(RecipeOutput exporter) { | ||
shaped(RecipeCategory.MISC, ModItems.compressedBoneMeal) | ||
.pattern("BB") | ||
.pattern("BB") | ||
.define('B', Items.BONE_MEAL) | ||
.unlockedBy("has_bone_meal", has(Items.BONE_MEAL)) | ||
.save(exporter); | ||
protected RecipeProvider createRecipeProvider(HolderLookup.Provider registryLookup, RecipeOutput exporter) { | ||
return new RecipeProvider(registryLookup, exporter) { | ||
@Override | ||
public void buildRecipes() { | ||
shaped(RecipeCategory.MISC, ModItems.compressedBoneMeal) | ||
.pattern("BB") | ||
.pattern("BB") | ||
.define('B', Items.BONE_MEAL) | ||
.unlockedBy("has_bone_meal", has(Items.BONE_MEAL)) | ||
.save(exporter); | ||
|
||
shaped(RecipeCategory.MISC, ModItems.extremelyCompressedBoneMeal) | ||
.pattern("BBB") | ||
.pattern("BBB") | ||
.pattern("BBB") | ||
.define('B', ModItems.compressedBoneMeal) | ||
.unlockedBy("has_compressed_bone_meal", has(ModItems.compressedBoneMeal)) | ||
.save(exporter); | ||
|
||
shaped(RecipeCategory.MISC, ModItems.extremelyCompressedBoneMeal) | ||
.pattern("BBB") | ||
.pattern("BBB") | ||
.pattern("BBB") | ||
.define('B', ModItems.compressedBoneMeal) | ||
.unlockedBy("has_compressed_bone_meal", has(ModItems.compressedBoneMeal)) | ||
.save(exporter); | ||
shaped(RecipeCategory.MISC, ModItems.floristsBoneMeal, 2) | ||
.pattern("BF") | ||
.pattern("FB") | ||
.define('B', Items.BONE_MEAL) | ||
.define('F', ItemTags.FLOWERS) | ||
.unlockedBy("has_bone_meal", has(Items.BONE_MEAL)) | ||
.save(exporter); | ||
} | ||
}; | ||
} | ||
|
||
shaped(RecipeCategory.MISC, ModItems.floristsBoneMeal, 2) | ||
.pattern("BF") | ||
.pattern("FB") | ||
.define('B', Items.BONE_MEAL) | ||
.define('F', ItemTags.FLOWERS) | ||
.unlockedBy("has_bone_meal", has(Items.BONE_MEAL)) | ||
.save(exporter); | ||
@Override | ||
public String getName() { | ||
return Fertilization.MOD_ID; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters