Test ver 1
This commit is contained in:
parent
144603f59d
commit
8b8aa33785
@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"schemaVersion": 1,
|
|
||||||
"id": "nethercraft-classic",
|
|
||||||
"version": "${version}",
|
|
||||||
"name": "Nethercraft Classic",
|
|
||||||
"description": "A classic beta mod originally by scokeev9. The mod makes the Nether survivable, adding things like food, trees, new ores, and mobs. As of the Nether Update, biomes are now included!",
|
|
||||||
"authors": [
|
|
||||||
"scokeev9",
|
|
||||||
"IveBeenAlone"
|
|
||||||
],
|
|
||||||
"contact": {
|
|
||||||
"homepage": "https://ibatv.xyz/",
|
|
||||||
"sources": "https://git.ibatv.xyz/IveBeenAlone/nethercraft-classic-fabric"
|
|
||||||
},
|
|
||||||
"license": "CC0-1.0",
|
|
||||||
"icon": "assets/nethercraft-classic/icon.png",
|
|
||||||
"environment": "*",
|
|
||||||
"entrypoints": {
|
|
||||||
"main": [
|
|
||||||
"xyz.ibatv.nethercraft.NethercraftClassic"
|
|
||||||
],
|
|
||||||
"fabric-datagen": [
|
|
||||||
"xyz.ibatv.nethercraft.NethercraftClassicDataGenerator"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"mixins": [
|
|
||||||
"nethercraft-classic.mixins.json"
|
|
||||||
],
|
|
||||||
"depends": {
|
|
||||||
"fabricloader": ">=0.16.10",
|
|
||||||
"minecraft": "~1.21.4",
|
|
||||||
"java": ">=21",
|
|
||||||
"fabric-api": "*"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"required": true,
|
|
||||||
"package": "xyz.ibatv.nethercraft.mixin",
|
|
||||||
"compatibilityLevel": "JAVA_21",
|
|
||||||
"mixins": [
|
|
||||||
"ExampleMixin"
|
|
||||||
],
|
|
||||||
"injectors": {
|
|
||||||
"defaultRequire": 1
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,6 +4,7 @@ import net.fabricmc.api.ModInitializer;
|
|||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
|
||||||
public class NethercraftClassic implements ModInitializer {
|
public class NethercraftClassic implements ModInitializer {
|
||||||
public static final String MOD_ID = "nethercraft-classic";
|
public static final String MOD_ID = "nethercraft-classic";
|
||||||
@ -14,11 +15,17 @@ public class NethercraftClassic implements ModInitializer {
|
|||||||
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
|
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
||||||
// However, some things (like resources) may still be uninitialized.
|
// However, some things (like resources) may still be uninitialized.
|
||||||
// Proceed with mild caution.
|
// Proceed with mild caution.
|
||||||
|
|
||||||
LOGGER.info("Hello Fabric world!");
|
//LOGGER.info("Hello Fabric world!");
|
||||||
|
|
||||||
|
//ModItemGroups.registeritemGroups();
|
||||||
|
|
||||||
|
//ModItems.registerModItems();
|
||||||
|
ModBlocks.registerModBlocks();
|
||||||
}
|
}
|
||||||
}
|
}
|
40
src/main/java/xyz/ibatv/nethercraft/block/ModBlocks.java
Normal file
40
src/main/java/xyz/ibatv/nethercraft/block/ModBlocks.java
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
package xyz.ibatv.nethercraft.block;
|
||||||
|
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.BlockItem;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import xyz.ibatv.nethercraft.NethercraftClassic;
|
||||||
|
|
||||||
|
public class ModBlocks {
|
||||||
|
|
||||||
|
public static final Block GLOWOOD_PLANKS = registerBlock("glowood_planks",
|
||||||
|
new Block(AbstractBlock.Settings.create().strength(4f).requiresTool().sounds(BlockSoundGroup.WOOD)));
|
||||||
|
|
||||||
|
private static Block registerBlockWithoutBlockItem(String name, Block block){
|
||||||
|
return Registry.register(Registries.BLOCK, Identifier.of(NethercraftClassic.MOD_ID, name), block);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Block registerBlock(String name, Block block){
|
||||||
|
registerBlockItem(name, block);
|
||||||
|
return Registry.register(Registries.BLOCK, Identifier.of(NethercraftClassic.MOD_ID, name), block);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void registerBlockItem(String name, Block block){
|
||||||
|
Registry.register(Registries.ITEM, Identifier.of(NethercraftClassic.MOD_ID, name),
|
||||||
|
new BlockItem(block, new Item.Settings()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerModBlocks(){
|
||||||
|
NethercraftClassic.LOGGER.info("Registering Mod blocks for " + NethercraftClassic.MOD_ID);
|
||||||
|
|
||||||
|
//ItemGroupEvents.modifyEntriesEvent(ItemGroups.BUILDING_BLOCKS).register(entries -> {
|
||||||
|
// entries.add(ModBlocks.PROSPERITY_GEMSTONE_BLOCK);
|
||||||
|
// entries.add(ModBlocks.PROSPERITY_INGOT_BLOCK);
|
||||||
|
//});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package xyz.ibatv.nethercraft.datagen;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
|
||||||
|
import net.minecraft.registry.RegistryWrapper;
|
||||||
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
public class ModBlockTagProvider extends FabricTagProvider.BlockTagProvider {
|
||||||
|
public ModBlockTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
|
||||||
|
super(output, registriesFuture);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) {
|
||||||
|
getOrCreateTagBuilder(BlockTags.AXE_MINEABLE)
|
||||||
|
.add(ModBlocks.GLOWOOD_PLANKS);
|
||||||
|
|
||||||
|
//getOrCreateTagBuilder(BlockTags.NEEDS_STONE_TOOL)
|
||||||
|
// .add(ModBlocks.INFUSION_ALTAR)
|
||||||
|
|
||||||
|
|
||||||
|
//getOrCreateTagBuilder(BlockTags.NEEDS_IRON_TOOL)
|
||||||
|
// .add(ModBlocks.PROSPERITY_GEMSTONE_BLOCK)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package xyz.ibatv.nethercraft.datagen;
|
||||||
|
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
|
||||||
|
import xyz.ibatv.nethercraft.item.ModItems;
|
||||||
|
//import xyz.ibatv.nethercraft.util.ModTags;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.registry.RegistryWrapper;
|
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
public class ModItemTagProvider extends FabricTagProvider.ItemTagProvider {
|
||||||
|
public ModItemTagProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> completableFuture) {
|
||||||
|
super(output, completableFuture);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) {
|
||||||
|
//getOrCreateTagBuilder(ModTags.Items.TRANSFORMABLE_ITEMS)
|
||||||
|
// .add(ModItems.PINK_GARNET)
|
||||||
|
// .add(ModItems.RAW_PINK_GARNET)
|
||||||
|
// .add(Items.COAL)
|
||||||
|
// .add(Items.STICK)
|
||||||
|
// .add(Items.APPLE);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package xyz.ibatv.nethercraft.datagen;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.enchantment.Enchantment;
|
||||||
|
import net.minecraft.enchantment.Enchantments;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.loot.LootTable;
|
||||||
|
import net.minecraft.loot.condition.BlockStatePropertyLootCondition;
|
||||||
|
import net.minecraft.loot.entry.ItemEntry;
|
||||||
|
import net.minecraft.loot.entry.LeafEntry;
|
||||||
|
import net.minecraft.loot.entry.LootPoolEntry;
|
||||||
|
import net.minecraft.loot.function.ApplyBonusLootFunction;
|
||||||
|
import net.minecraft.loot.function.SetCountLootFunction;
|
||||||
|
import net.minecraft.loot.provider.number.UniformLootNumberProvider;
|
||||||
|
import net.minecraft.predicate.StatePredicate;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.RegistryWrapper;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
import xyz.ibatv.nethercraft.item.ModItems;
|
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
public class ModLootTableProvider extends FabricBlockLootTableProvider {
|
||||||
|
public ModLootTableProvider(FabricDataOutput dataOutput, CompletableFuture<RegistryWrapper.WrapperLookup> registryLookup) {
|
||||||
|
super(dataOutput, registryLookup);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generate() {
|
||||||
|
addDrop(ModBlocks.GLOWOOD_PLANKS);
|
||||||
|
|
||||||
|
//addDrop(ModBlocks.PROSPERITY_ORE, multipleOreDrops(ModBlocks.PROSPERITY_ORE, ModItems.PROSPERITY_SHARD, 1, 4));
|
||||||
|
//addDrop(ModBlocks.INFERIUM_ORE, multipleOreDrops(ModBlocks.INFERIUM_ORE, ModItems.INFERIUM_ESSENCE, 2, 4));
|
||||||
|
|
||||||
|
|
||||||
|
//BlockStatePropertyLootCondition.Builder builder2 = BlockStatePropertyLootCondition.builder(ModBlocks.COAL_CROP)
|
||||||
|
// .properties(StatePredicate.Builder.create().exactMatch(CoalCropBlock.AGE, CoalCropBlock.MAX_AGE));
|
||||||
|
//this.addDrop(ModBlocks.COAL_CROP, this.cropDrops(ModBlocks.COAL_CROP, ModItems.COAL_ESSENCE, ModItems.COAL_CROP_SEEDS, builder2));
|
||||||
|
|
||||||
|
}
|
||||||
|
public LootTable.Builder multipleOreDrops(Block drop, Item item, float minDrops, float maxDrops) {
|
||||||
|
RegistryWrapper.Impl<Enchantment> impl = this.registryLookup.getWrapperOrThrow(RegistryKeys.ENCHANTMENT);
|
||||||
|
return this.dropsWithSilkTouch(drop, this.applyExplosionDecay(drop, ((LeafEntry.Builder<?>)
|
||||||
|
ItemEntry.builder(item).apply(SetCountLootFunction.builder(UniformLootNumberProvider.create(minDrops, maxDrops))))
|
||||||
|
.apply(ApplyBonusLootFunction.oreDrops(impl.getOrThrow(Enchantments.FORTUNE)))));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package xyz.ibatv.nethercraft.datagen;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider;
|
||||||
|
import net.minecraft.data.client.BlockStateModelGenerator;
|
||||||
|
import net.minecraft.data.client.ItemModelGenerator;
|
||||||
|
import net.minecraft.data.client.Models;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
import xyz.ibatv.nethercraft.item.ModItems;
|
||||||
|
|
||||||
|
public class ModModelProvider extends FabricModelProvider {
|
||||||
|
public ModModelProvider(FabricDataOutput output) {
|
||||||
|
super(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) {
|
||||||
|
blockStateModelGenerator.registerSimpleCubeAll(ModBlocks.GLOWOOD_PLANKS);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateItemModels(ItemModelGenerator itemModelGenerator) {
|
||||||
|
//itemModelGenerator.register(ModItems.PROSPERITY_SHARD, Models.GENERATED);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,190 @@
|
|||||||
|
package xyz.ibatv.nethercraft.datagen;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
|
||||||
|
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider;
|
||||||
|
import net.fabricmc.fabric.api.tag.convention.v2.ConventionalItemTags;
|
||||||
|
import net.minecraft.data.server.recipe.RecipeExporter;
|
||||||
|
import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder;
|
||||||
|
import net.minecraft.recipe.book.RecipeCategory;
|
||||||
|
import net.minecraft.registry.RegistryWrapper;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import xyz.ibatv.nethercraft.NethercraftClassic;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
import xyz.ibatv.nethercraft.item.ModItems;
|
||||||
|
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
|
public class ModRecipeProvider extends FabricRecipeProvider {
|
||||||
|
public ModRecipeProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
|
||||||
|
super(output, registriesFuture);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generate(RecipeExporter recipeExporter) {
|
||||||
|
/*offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.PROSPERITY_SHARD, RecipeCategory.BUILDING_BLOCKS, ModBlocks.PROSPERITY_GEMSTONE_BLOCK);
|
||||||
|
offerReversibleCompactingRecipes(recipeExporter, RecipeCategory.BUILDING_BLOCKS, ModItems.PROSPERITY_INGOT, RecipeCategory.BUILDING_BLOCKS, ModBlocks.PROSPERITY_INGOT_BLOCK);
|
||||||
|
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.PROSPERITY_INGOT)
|
||||||
|
.pattern(" S ")
|
||||||
|
.pattern("SIS")
|
||||||
|
.pattern(" S ")
|
||||||
|
.input('S', ModItems.PROSPERITY_SHARD)
|
||||||
|
.input('I', ConventionalItemTags.IRON_INGOTS)
|
||||||
|
.criterion(hasItem(ModItems.PROSPERITY_SHARD), conditionsFromItem(ModItems.PROSPERITY_SHARD))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "prosperity_shards_to_ingot"));
|
||||||
|
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.PRUDENTIUM_ESSENCE, 16)
|
||||||
|
.pattern(" S ")
|
||||||
|
.pattern("SIS")
|
||||||
|
.pattern(" S ")
|
||||||
|
.input('S', ModItems.INFERIUM_ESSENCE)
|
||||||
|
.input('I', ModItems.INFUSION_CRYSTAL)
|
||||||
|
.criterion(hasItem(ModItems.INFUSION_CRYSTAL), conditionsFromItem(ModItems.INFUSION_CRYSTAL))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "prudentium_essence_recipe"));
|
||||||
|
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.PROSPERITY_SEED_BASE)
|
||||||
|
.pattern(" S ")
|
||||||
|
.pattern("SWS")
|
||||||
|
.pattern(" S ")
|
||||||
|
.input('S', ModItems.PROSPERITY_SHARD)
|
||||||
|
.input('W', ModItems.PLACEHOLDER)
|
||||||
|
//replace 'ModID:placeholder' with 'minecraft:wheat_seeds' after data gen
|
||||||
|
.criterion(hasItem(ModItems.PROSPERITY_SHARD), conditionsFromItem(ModItems.PROSPERITY_SHARD))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "prosperity_seed_base_recipe"));
|
||||||
|
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.INFERIUM_CROP_SEEDS)
|
||||||
|
.pattern(" I ")
|
||||||
|
.pattern("IBI")
|
||||||
|
.pattern(" I ")
|
||||||
|
.input('I', ModItems.INFERIUM_ESSENCE)
|
||||||
|
.input('B', ModItems.PROSPERITY_SEED_BASE)
|
||||||
|
.criterion(hasItem(ModItems.PROSPERITY_SEED_BASE), conditionsFromItem(ModItems.PROSPERITY_SEED_BASE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "t1_seed_base_recipe"));
|
||||||
|
|
||||||
|
//
|
||||||
|
// COAL ORE
|
||||||
|
//
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.COAL_CROP_SEEDS)
|
||||||
|
.pattern("CIC")
|
||||||
|
.pattern("ITI")
|
||||||
|
.pattern("CIC")
|
||||||
|
.input('I', ModItems.PRUDENTIUM_ESSENCE)
|
||||||
|
.input('T', ModItems.PROSPERITY_SEED_BASE)
|
||||||
|
.input('C', ModItems.PLACEHOLDER)
|
||||||
|
// Replace 'ModId:PLACEHOLDER' with 'minecraft:coal' after data gen
|
||||||
|
.criterion(hasItem(ModItems.PROSPERITY_SEED_BASE), conditionsFromItem(ModItems.PROSPERITY_SEED_BASE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "coal_seeds_recipe"));
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.PLACEHOLDER, 12)
|
||||||
|
// why the FUCK does coal not exist??? Most useless fucking thing possible.
|
||||||
|
// Replace 'ModId:PLACEHOLDER' with 'minecraft:coal' after data gen
|
||||||
|
.pattern("CCC")
|
||||||
|
.pattern("C C")
|
||||||
|
.pattern("CCC")
|
||||||
|
.input('C', ModItems.COAL_ESSENCE)
|
||||||
|
.criterion(hasItem(ModItems.COAL_ESSENCE), conditionsFromItem(ModItems.COAL_ESSENCE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "coal_essence_to_coal"));
|
||||||
|
|
||||||
|
//
|
||||||
|
// COPPER ORE
|
||||||
|
//
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.COPPER_CROP_SEEDS)
|
||||||
|
.pattern("CIC")
|
||||||
|
.pattern("ITI")
|
||||||
|
.pattern("CIC")
|
||||||
|
.input('I', ModItems.INFERIUM_ESSENCE)
|
||||||
|
.input('T', ModItems.PROSPERITY_SEED_BASE)
|
||||||
|
.input('C', ConventionalItemTags.COPPER_INGOTS)
|
||||||
|
.criterion(hasItem(ModItems.PROSPERITY_SEED_BASE), conditionsFromItem(ModItems.PROSPERITY_SEED_BASE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "copper_seeds_recipe"));
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.PLACEHOLDER, 12)
|
||||||
|
// why the FUCK does copper ingot not exist??? Most useless fucking thing possible.
|
||||||
|
// Replace 'ModId:PLACEHOLDER' with 'minecraft:copper_ingot' after data gen
|
||||||
|
.pattern("CCC")
|
||||||
|
.pattern("C C")
|
||||||
|
.pattern("CCC")
|
||||||
|
.input('C', ModItems.COPPER_ESSENCE)
|
||||||
|
.criterion(hasItem(ModItems.COPPER_ESSENCE), conditionsFromItem(ModItems.COPPER_ESSENCE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "copper_essence_to_ingot"));
|
||||||
|
|
||||||
|
//
|
||||||
|
// IRON ORE
|
||||||
|
//
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.IRON_CROP_SEEDS)
|
||||||
|
.pattern("CIC")
|
||||||
|
.pattern("ITI")
|
||||||
|
.pattern("CIC")
|
||||||
|
.input('I', ModItems.INFERIUM_ESSENCE)
|
||||||
|
.input('T', ModItems.PROSPERITY_SEED_BASE)
|
||||||
|
.input('C', ConventionalItemTags.IRON_INGOTS)
|
||||||
|
.criterion(hasItem(ModItems.PROSPERITY_SEED_BASE), conditionsFromItem(ModItems.PROSPERITY_SEED_BASE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "iron_seeds_recipe"));
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.PLACEHOLDER, 12)
|
||||||
|
// why the FUCK does iron ingot not exist??? Most useless fucking thing possible.
|
||||||
|
// Replace 'ModId:PLACEHOLDER' with 'minecraft:iron_ingot' after data gen
|
||||||
|
.pattern("CCC")
|
||||||
|
.pattern("C C")
|
||||||
|
.pattern("CCC")
|
||||||
|
.input('C', ModItems.IRON_ESSENCE)
|
||||||
|
.criterion(hasItem(ModItems.IRON_ESSENCE), conditionsFromItem(ModItems.IRON_ESSENCE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "iron_essence_to_ingot"));
|
||||||
|
|
||||||
|
//
|
||||||
|
// GOLD ORE
|
||||||
|
//
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.GOLD_CROP_SEEDS)
|
||||||
|
.pattern("CIC")
|
||||||
|
.pattern("ITI")
|
||||||
|
.pattern("CIC")
|
||||||
|
.input('I', ModItems.INFERIUM_ESSENCE)
|
||||||
|
.input('T', ModItems.PROSPERITY_SEED_BASE)
|
||||||
|
.input('C', ConventionalItemTags.GOLD_INGOTS)
|
||||||
|
.criterion(hasItem(ModItems.PROSPERITY_SEED_BASE), conditionsFromItem(ModItems.PROSPERITY_SEED_BASE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "gold_seeds_recipe"));
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.PLACEHOLDER, 12)
|
||||||
|
// why the FUCK does gold ingot not exist??? Most useless fucking thing possible.
|
||||||
|
// Replace 'ModId:PLACEHOLDER' with 'minecraft:gold_ingot' after data gen
|
||||||
|
.pattern("CCC")
|
||||||
|
.pattern("C C")
|
||||||
|
.pattern("CCC")
|
||||||
|
.input('C', ModItems.GOLD_ESSENCE)
|
||||||
|
.criterion(hasItem(ModItems.GOLD_ESSENCE), conditionsFromItem(ModItems.GOLD_ESSENCE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "gold_essence_to_ingot"));
|
||||||
|
|
||||||
|
//
|
||||||
|
// DIAMOND ORE
|
||||||
|
//
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.DIAMOND_CROP_SEEDS)
|
||||||
|
.pattern("CIC")
|
||||||
|
.pattern("ITI")
|
||||||
|
.pattern("CIC")
|
||||||
|
.input('I', ModItems.INFERIUM_ESSENCE)
|
||||||
|
.input('T', ModItems.PROSPERITY_SEED_BASE)
|
||||||
|
.input('C', ConventionalItemTags.DIAMOND_GEMS)
|
||||||
|
.criterion(hasItem(ModItems.PROSPERITY_SEED_BASE), conditionsFromItem(ModItems.PROSPERITY_SEED_BASE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "diamond_seeds_recipe"));
|
||||||
|
|
||||||
|
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, ModItems.PLACEHOLDER, 12)
|
||||||
|
// why the FUCK does DIAMONDS not exist??? Most useless fucking thing possible.
|
||||||
|
// Replace 'ModId:PLACEHOLDER' with 'minecraft:diamond' after data gen
|
||||||
|
.pattern("CCC")
|
||||||
|
.pattern("C C")
|
||||||
|
.pattern("CCC")
|
||||||
|
.input('C', ModItems.DIAMOND_ESSENCE)
|
||||||
|
.criterion(hasItem(ModItems.DIAMOND_ESSENCE), conditionsFromItem(ModItems.DIAMOND_ESSENCE))
|
||||||
|
.offerTo(recipeExporter, Identifier.of(MysticalAgricultureFabric.MOD_ID, "diamond_essence_to_gem"));*/
|
||||||
|
}
|
||||||
|
}
|
31
src/main/java/xyz/ibatv/nethercraft/item/ModItemGroups.java
Normal file
31
src/main/java/xyz/ibatv/nethercraft/item/ModItemGroups.java
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
package xyz.ibatv.nethercraft.item;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
|
||||||
|
import net.minecraft.item.ItemGroup;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
import xyz.ibatv.nethercraft.item.ModItems;
|
||||||
|
import xyz.ibatv.nethercraft.NethercraftClassic;
|
||||||
|
|
||||||
|
public class ModItemGroups {
|
||||||
|
public static final ItemGroup MYSTICAL_AGRICULTURE_FABRIC = Registry.register(Registries.ITEM_GROUP,
|
||||||
|
Identifier.of(NethercraftClassic.MOD_ID, "mystical_agriculture_fabric"),
|
||||||
|
FabricItemGroup.builder().icon(() -> new ItemStack(ModBlocks.GLOWOOD_PLANKS))
|
||||||
|
.displayName(Text.translatable("itemgroup.MysticalAgricultureFabric.mystical_agriculture_fabric"))
|
||||||
|
.entries((displayContext, entries) -> {
|
||||||
|
//Blocks
|
||||||
|
entries.add(ModBlocks.GLOWOOD_PLANKS);
|
||||||
|
//Items
|
||||||
|
entries.add(ModItems.NETHERSTICK);
|
||||||
|
}).build());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void registeritemGroups(){
|
||||||
|
NethercraftClassic.LOGGER.info("Registering Item Groups for " + NethercraftClassic.MOD_ID);
|
||||||
|
}
|
||||||
|
}
|
34
src/main/java/xyz/ibatv/nethercraft/item/ModItems.java
Normal file
34
src/main/java/xyz/ibatv/nethercraft/item/ModItems.java
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package xyz.ibatv.nethercraft.item;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
||||||
|
import net.minecraft.item.AliasedBlockItem;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemGroups;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import xyz.ibatv.nethercraft.NethercraftClassic;
|
||||||
|
import xyz.ibatv.nethercraft.block.ModBlocks;
|
||||||
|
|
||||||
|
public class ModItems {
|
||||||
|
public static final Item NETHERSTICK = registerItem("netherstick", new Item(new Item.Settings()));
|
||||||
|
|
||||||
|
|
||||||
|
public static final Item PLACEHOLDER = registerItem("placeholder", new Item(new Item.Settings()));
|
||||||
|
//Placeholder for recipes when ConventionalItemTags.* doesn't actually have an item because fuck you.
|
||||||
|
|
||||||
|
|
||||||
|
//public static final Item COAL_CROP_SEEDS = registerItem("coal_crop_seeds",
|
||||||
|
// new AliasedBlockItem(ModBlocks.COAL_CROP, new Item.Settings()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static Item registerItem(String name, Item item) {
|
||||||
|
return Registry.register(Registries.ITEM, Identifier.of(NethercraftClassic.MOD_ID, name), item);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerModItems() {
|
||||||
|
NethercraftClassic.LOGGER.info("Registering Mod Items for " + NethercraftClassic.MOD_ID);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user