[Change] Datadriven Recipes
This commit is contained in:
parent
f8c7fb9be8
commit
89e6b2348e
6 changed files with 44 additions and 8 deletions
|
@ -8,7 +8,6 @@ import org.betterx.betterend.commands.CommandRegistry;
|
|||
import org.betterx.betterend.config.Configs;
|
||||
import org.betterx.betterend.effects.EndPotions;
|
||||
import org.betterx.betterend.integration.Integrations;
|
||||
import org.betterx.betterend.recipe.*;
|
||||
import org.betterx.betterend.registry.*;
|
||||
import org.betterx.betterend.util.BonemealPlants;
|
||||
import org.betterx.betterend.util.LootTableUtil;
|
||||
|
@ -47,12 +46,6 @@ public class BetterEnd implements ModInitializer {
|
|||
EndItems.ensureStaticallyLoaded();
|
||||
EndEnchantments.register();
|
||||
EndPotions.register();
|
||||
CraftingRecipes.register();
|
||||
FurnaceRecipes.register();
|
||||
AlloyingRecipes.register();
|
||||
AnvilRecipes.register();
|
||||
SmithingRecipes.register();
|
||||
InfusionRecipes.register();
|
||||
EndStructures.register();
|
||||
BonemealPlants.init();
|
||||
GeneratorOptions.init();
|
||||
|
|
|
@ -248,6 +248,19 @@ public class InfusionRecipes {
|
|||
.setGroup("enchantment")
|
||||
.setTime(300)
|
||||
.build();
|
||||
InfusionRecipe.create("swift_sneak_book", Enchantments.SWIFT_SNEAK, 1)
|
||||
.setPrimaryInputAndUnlock(Items.BOOK)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.NORTH, EndItems.ETERNAL_CRYSTAL)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.EAST, Items.SCULK_SENSOR)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.SOUTH, Items.SCULK_CATALYST)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.WEST, Items.SCULK_SENSOR)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.NORTH_EAST, Items.SCULK_VEIN)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.SOUTH_EAST, EndItems.ENCHANTED_PETAL)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.SOUTH_WEST, EndItems.ENCHANTED_PETAL)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.NORTH_WEST, Items.SCULK_VEIN)
|
||||
.setGroup("enchantment")
|
||||
.setTime(500)
|
||||
.build();
|
||||
InfusionRecipe.create("sharpness_book", Enchantments.SHARPNESS, 1)
|
||||
.setPrimaryInputAndUnlock(Items.BOOK)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.NORTH, EndItems.ENCHANTED_PETAL)
|
||||
|
@ -260,6 +273,7 @@ public class InfusionRecipes {
|
|||
.setTime(300)
|
||||
.build();
|
||||
InfusionRecipe.create("smite_book", Enchantments.SMITE, 1)
|
||||
.setPrimaryInputAndUnlock(Items.BOOK)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.NORTH, EndItems.ENCHANTED_PETAL)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.EAST, Blocks.SUNFLOWER)
|
||||
.addCatalyst(InfusionRecipe.Catalysts.SOUTH, Items.GOLD_INGOT)
|
||||
|
|
|
@ -243,7 +243,7 @@ public class InfusionRecipe implements Recipe<InfusionRitual>, UnknownReceipBook
|
|||
NORTH(0, "north"),
|
||||
NORTH_EAST(1, "north_east"),
|
||||
EAST(2, "east"),
|
||||
SOUTH_EAST(3, ""),
|
||||
SOUTH_EAST(3, "south_east"),
|
||||
SOUTH(4, "south"),
|
||||
SOUTH_WEST(5, "south_west"),
|
||||
WEST(6, "west"),
|
||||
|
|
|
@ -1335,6 +1335,7 @@ public class EndFeatures {
|
|||
.configuration(new OreLayerFeatureConfig(block.defaultBlockState(), radius, minY, maxY))
|
||||
.build()
|
||||
.place()
|
||||
.onlyInBiome()
|
||||
.decoration(GenerationStep.Decoration.UNDERGROUND_ORES)
|
||||
.count(count)
|
||||
.build();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.betterx.datagen.betterend;
|
||||
|
||||
import org.betterx.datagen.betterend.advancement.EndAdvancementDataProvider;
|
||||
import org.betterx.datagen.betterend.recipes.EndRecipeDataProvider;
|
||||
import org.betterx.datagen.betterend.worldgen.EndBiomesDataProvider;
|
||||
import org.betterx.datagen.betterend.worldgen.EndRegistriesDataProvider;
|
||||
|
||||
|
@ -14,9 +15,12 @@ public class BetterEndDatagen implements DataGeneratorEntrypoint {
|
|||
@Override
|
||||
public void onInitializeDataGenerator(FabricDataGenerator dataGenerator) {
|
||||
EndBiomesDataProvider.ensureStaticallyLoaded();
|
||||
EndRecipeDataProvider.buildRecipes();
|
||||
|
||||
final FabricDataGenerator.Pack pack = dataGenerator.createPack();
|
||||
pack.addProvider(EndBiomesDataProvider::new);
|
||||
|
||||
pack.addProvider(EndRecipeDataProvider::new);
|
||||
pack.addProvider(EndRegistriesDataProvider::new);
|
||||
pack.addProvider(EndAdvancementDataProvider::new);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package org.betterx.datagen.betterend.recipes;
|
||||
|
||||
import org.betterx.bclib.api.v3.datagen.RecipeDataProvider;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.recipe.*;
|
||||
|
||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EndRecipeDataProvider extends RecipeDataProvider {
|
||||
public EndRecipeDataProvider(FabricDataOutput output) {
|
||||
super(List.of(BetterEnd.MOD_ID), output);
|
||||
}
|
||||
|
||||
public static void buildRecipes() {
|
||||
CraftingRecipes.register();
|
||||
FurnaceRecipes.register();
|
||||
AlloyingRecipes.register();
|
||||
AnvilRecipes.register();
|
||||
SmithingRecipes.register();
|
||||
InfusionRecipes.register();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue