diff --git a/.vscode/settings.json b/.vscode/settings.json index df066445..4a361cb0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "files.autoSave": "off", "java.jdt.ls.java.home": "/usr/local/sdkman/candidates/java/current", - "java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current" + "java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current", + "java.configuration.updateBuildConfiguration": "automatic" } \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index c5327ca0..e3f2a5e0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -218,6 +218,7 @@ fun Project.setupRepositories() { maven("https://maven.terraformersmc.com/releases/") maven("https://raw.githubusercontent.com/Fuzss/modresources/main/maven/") maven("https://maven.jamieswhiteshirt.com/libs-release") + maven("https://maven.shedaniel.me/") } } diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 11b90a65..28f4ddce 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -26,6 +26,8 @@ dependencies { modCompileOnly("net.fabricmc.fabric-api:fabric-api:${"fabric_api_version"()}") annotationProcessor(implementation("io.github.llamalad7:mixinextras-common:${"mixin_extras_version"()}")!!) + + modApi("dev.architectury:architectury:${"architectury_version"()}") } tasks.processResources { diff --git a/common/src/main/java/uwu/lopyluna/create_dd/access/AccessDyeColor.java b/common/src/main/java/uwu/lopyluna/create_dd/access/AccessDyeColor.java new file mode 100644 index 00000000..c20c6e20 --- /dev/null +++ b/common/src/main/java/uwu/lopyluna/create_dd/access/AccessDyeColor.java @@ -0,0 +1,10 @@ +package uwu.lopyluna.create_dd.access; + +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; + +public interface AccessDyeColor { + default TagKey getTag() { + return null; + } +} diff --git a/common/src/main/java/uwu/lopyluna/create_dd/content/recipes/DragonBreathingRecipe.java b/common/src/main/java/uwu/lopyluna/create_dd/content/recipes/DragonBreathingRecipe.java index 814dfea2..c6d2d02e 100644 --- a/common/src/main/java/uwu/lopyluna/create_dd/content/recipes/DragonBreathingRecipe.java +++ b/common/src/main/java/uwu/lopyluna/create_dd/content/recipes/DragonBreathingRecipe.java @@ -3,8 +3,6 @@ import com.simibubi.create.content.processing.recipe.ProcessingRecipe; import com.simibubi.create.content.processing.recipe.ProcessingRecipeBuilder.ProcessingRecipeParams; import net.minecraft.world.level.Level; -import net.minecraftforge.items.ItemStackHandler; -import net.minecraftforge.items.wrapper.RecipeWrapper; import uwu.lopyluna.create_dd.registry.DesiresRecipeTypes; import javax.annotation.ParametersAreNonnullByDefault; diff --git a/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/utility/ForgeTags.java b/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/utility/ForgeTags.java new file mode 100644 index 00000000..36e893ca --- /dev/null +++ b/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/utility/ForgeTags.java @@ -0,0 +1,538 @@ +package uwu.lopyluna.create_dd.infrastructure.utility; + +import java.util.Set; +import java.util.function.Supplier; + +import org.jetbrains.annotations.Nullable; + +import net.fabricmc.fabric.api.tag.convention.v1.ConventionalBlockTags; +import net.fabricmc.fabric.api.tag.convention.v1.ConventionalItemTags; +import net.minecraft.core.Registry; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.material.Fluid; +import uwu.lopyluna.create_dd.access.AccessDyeColor; + +// From https://github.com/Fabricators-of-Create/Porting-Lib/blob/1.19.3/tags/src/main/java/me/alphamode/forgetags/Tags.java +public class ForgeTags { + public static class Blocks { + public static final TagKey BARRELS = tag("barrels"); + public static final TagKey BARRELS_WOODEN = tag("wooden_barrels"); + public static final TagKey BOOKSHELVES = ConventionalBlockTags.BOOKSHELVES; + public static final TagKey CHESTS = ConventionalBlockTags.CHESTS; + public static final TagKey CHESTS_ENDER = tag("ender_chests"); + public static final TagKey CHESTS_TRAPPED = tag("trapped_chests"); + public static final TagKey CHESTS_WOODEN = tag("wooden_chests"); + public static final TagKey COBBLESTONE = tag("cobblestone"); + public static final TagKey COBBLESTONE_NORMAL = tag("normal_cobblestone"); + public static final TagKey COBBLESTONE_INFESTED = tag("infested_cobblestone"); + public static final TagKey COBBLESTONE_MOSSY = tag("mossy_cobblestone"); + public static final TagKey COBBLESTONE_DEEPSLATE = tag("deepslate_cobblestone"); + public static final TagKey END_STONES = tag("end_stones"); + public static final TagKey ENDERMAN_PLACE_ON_BLACKLIST = tag("enderman_place_on_blacklist"); + public static final TagKey FENCE_GATES = tag("fence_gates"); + public static final TagKey FENCE_GATES_WOODEN = tag("wooden_fence_gates"); + public static final TagKey FENCES = tag("fences"); + public static final TagKey FENCES_NETHER_BRICK = tag("nether_brick_fences"); + public static final TagKey FENCES_WOODEN = tag("wooden_fences"); + + public static final TagKey GLASS = ConventionalBlockTags.GLASS_BLOCKS; + public static final TagKey GLASS_BLACK = tag("black_glass"); + public static final TagKey GLASS_BLUE = tag("blue_glass"); + public static final TagKey GLASS_BROWN = tag("brown_glass"); + public static final TagKey GLASS_COLORLESS = tag("colorless_glass"); + public static final TagKey GLASS_CYAN = tag("cyan_glass"); + public static final TagKey GLASS_GRAY = tag("gray_glass"); + public static final TagKey GLASS_GREEN = tag("green_glass"); + public static final TagKey GLASS_LIGHT_BLUE = tag("light_blue_glass"); + public static final TagKey GLASS_LIGHT_GRAY = tag("light_gray_glass"); + public static final TagKey GLASS_LIME = tag("lime_glass"); + public static final TagKey GLASS_MAGENTA = tag("magenta_glass"); + public static final TagKey GLASS_ORANGE = tag("orange_glass"); + public static final TagKey GLASS_PINK = tag("pink_glass"); + public static final TagKey GLASS_PURPLE = tag("purple_glass"); + public static final TagKey GLASS_RED = tag("red_glass"); + /** + * Glass which is made from sand and only minor additional ingredients like dyes + */ + public static final TagKey GLASS_SILICA = tag("silica_glass"); + public static final TagKey GLASS_TINTED = tag("tinted_glass"); + public static final TagKey GLASS_WHITE = tag("white_glass"); + public static final TagKey GLASS_YELLOW = tag("yellow_glass"); + + public static final TagKey GLASS_PANES = ConventionalBlockTags.GLASS_PANES; + public static final TagKey GLASS_PANES_BLACK = tag("black_glass_panes"); + public static final TagKey GLASS_PANES_BLUE = tag("blue_glass_panes"); + public static final TagKey GLASS_PANES_BROWN = tag("brown_glass_panes"); + public static final TagKey GLASS_PANES_COLORLESS = tag("colorless_glass_panes"); + public static final TagKey GLASS_PANES_CYAN = tag("cyan_glass_panes"); + public static final TagKey GLASS_PANES_GRAY = tag("gray_glass_panes"); + public static final TagKey GLASS_PANES_GREEN = tag("green_glass_panes"); + public static final TagKey GLASS_PANES_LIGHT_BLUE = tag("light_blue_glass_panes"); + public static final TagKey GLASS_PANES_LIGHT_GRAY = tag("light_gray_glass_panes"); + public static final TagKey GLASS_PANES_LIME = tag("lime_glass_panes"); + public static final TagKey GLASS_PANES_MAGENTA = tag("magenta_glass_panes"); + public static final TagKey GLASS_PANES_ORANGE = tag("orange_glass_panes"); + public static final TagKey GLASS_PANES_PINK = tag("pink_glass_panes"); + public static final TagKey GLASS_PANES_PURPLE = tag("purple_glass_panes"); + public static final TagKey GLASS_PANES_RED = tag("red_glass_panes"); + public static final TagKey GLASS_PANES_WHITE = tag("white_glass_panes"); + public static final TagKey GLASS_PANES_YELLOW = tag("yellow_glass_panes"); + + public static final TagKey GRAVEL = tag("gravel"); + public static final TagKey NETHERRACK = tag("netherrack"); + public static final TagKey OBSIDIAN = tag("obsidian"); + /** + * Blocks which are often replaced by deepslate ores, i.e. the ores in the tag {@link #ORES_IN_GROUND_DEEPSLATE}, during world generation + */ + public static final TagKey ORE_BEARING_GROUND_DEEPSLATE = tag("ore_bearing_ground/deepslate"); + /** + * Blocks which are often replaced by netherrack ores, i.e. the ores in the tag {@link #ORES_IN_GROUND_NETHERRACK}, during world generation + */ + public static final TagKey ORE_BEARING_GROUND_NETHERRACK = tag("ore_bearing_ground/netherrack"); + /** + * Blocks which are often replaced by stone ores, i.e. the ores in the tag {@link #ORES_IN_GROUND_STONE}, during world generation + */ + public static final TagKey ORE_BEARING_GROUND_STONE = tag("ore_bearing_ground/stone"); + /** + * Ores which on average result in more than one resource worth of materials + */ + public static final TagKey ORE_RATES_DENSE = tag("ore_rates/dense"); + /** + * Ores which on average result in one resource worth of materials + */ + public static final TagKey ORE_RATES_SINGULAR = tag("ore_rates/singular"); + /** + * Ores which on average result in less than one resource worth of materials + */ + public static final TagKey ORE_RATES_SPARSE = tag("ore_rates/sparse"); + public static final TagKey ORES = tag("ores"); + public static final TagKey ORES_COAL = tag("coal_ores"); + public static final TagKey ORES_COPPER = tag("copper_ores"); + public static final TagKey ORES_DIAMOND = tag("diamond_ores"); + public static final TagKey ORES_EMERALD = tag("emerald_ores"); + public static final TagKey ORES_GOLD = tag("gold_ores"); + public static final TagKey ORES_IRON = tag("iron_ores"); + public static final TagKey ORES_LAPIS = tag("lapis_ores"); + public static final TagKey ORES_NETHERITE_SCRAP = tag("netherite_scrap_ores"); + public static final TagKey ORES_QUARTZ = ConventionalBlockTags.QUARTZ_ORES; + public static final TagKey ORES_REDSTONE = tag("redstone_ores"); + /** + * Ores in deepslate (or in equivalent blocks in the tag {@link #ORE_BEARING_GROUND_DEEPSLATE}) which could logically use deepslate as recipe input or output + */ + public static final TagKey ORES_IN_GROUND_DEEPSLATE = tag("ores_in_ground/deepslate"); + /** + * Ores in netherrack (or in equivalent blocks in the tag {@link #ORE_BEARING_GROUND_NETHERRACK}) which could logically use netherrack as recipe input or output + */ + public static final TagKey ORES_IN_GROUND_NETHERRACK = tag("ores_in_ground/netherrack"); + /** + * Ores in stone (or in equivalent blocks in the tag {@link #ORE_BEARING_GROUND_STONE}) which could logically use stone as recipe input or output + */ + public static final TagKey ORES_IN_GROUND_STONE = tag("ores_in_ground/stone"); + + public static final TagKey SAND = tag("sand"); + public static final TagKey SAND_COLORLESS = tag("colorless_sand"); + public static final TagKey SAND_RED = tag("red_sand"); + + public static final TagKey SANDSTONE = tag("sandstone"); + public static final TagKey STAINED_GLASS = tag("stained_glass"); + public static final TagKey STAINED_GLASS_PANES = tag("stained_glass_panes"); + public static final TagKey STONE = tag("stone"); + public static final TagKey STORAGE_BLOCKS = tag("storage_blocks"); + public static final TagKey STORAGE_BLOCKS_AMETHYST = tag("amethyst_blocks"); + public static final TagKey STORAGE_BLOCKS_COAL = tag("coal_blocks"); + public static final TagKey STORAGE_BLOCKS_COPPER = tag("copper_blocks"); + public static final TagKey STORAGE_BLOCKS_DIAMOND = tag("diamond_blocks"); + public static final TagKey STORAGE_BLOCKS_EMERALD = tag("emerald_blocks"); + public static final TagKey STORAGE_BLOCKS_GOLD = tag("gold_blocks"); + public static final TagKey STORAGE_BLOCKS_IRON = tag("iron_blocks"); + public static final TagKey STORAGE_BLOCKS_LAPIS = tag("lapis_blocks"); + public static final TagKey STORAGE_BLOCKS_NETHERITE = tag("netherite_blocks"); + public static final TagKey STORAGE_BLOCKS_QUARTZ = tag("quartz_blocks"); + public static final TagKey STORAGE_BLOCKS_RAW_COPPER = tag("raw_copper_blocks"); + public static final TagKey STORAGE_BLOCKS_RAW_GOLD = tag("raw_gold_blocks"); + public static final TagKey STORAGE_BLOCKS_RAW_IRON = tag("raw_iron_blocks"); + public static final TagKey STORAGE_BLOCKS_REDSTONE = tag("redstone_blocks"); + + public static final TagKey NEEDS_WOOD_TOOL = tag("needs_wood_tool"); + public static final TagKey NEEDS_GOLD_TOOL = tag("needs_gold_tool"); + public static final TagKey NEEDS_NETHERITE_TOOL = tag("needs_netherite_tool"); + + private static TagKey tag(String name) { + return TagKey.create(Registry.BLOCK_REGISTRY, new ResourceLocation("c", name)); + } + } + + public static class EntityTypes { + public static final TagKey> BOSSES = tag("bosses"); + + private static TagKey> tag(String name) { + return TagKey.create(Registry.ENTITY_TYPE_REGISTRY, new ResourceLocation("c", name)); + } + } + + public static class Items { + public static final TagKey BARRELS = tag("barrels"); + public static final TagKey BARRELS_WOODEN = tag("wooden_barrels"); + public static final TagKey BONES = tag("bones"); + public static final TagKey BOOKSHELVES = tag("bookshelves"); + public static final TagKey CHESTS = tag("chests"); + public static final TagKey CHESTS_ENDER = tag("ender_chests"); + public static final TagKey CHESTS_TRAPPED = tag("trapped_chests"); + public static final TagKey CHESTS_WOODEN = tag("wooden_chests"); + public static final TagKey COBBLESTONE = tag("cobblestone"); + public static final TagKey COBBLESTONE_NORMAL = tag("normal_cobblestone"); + public static final TagKey COBBLESTONE_INFESTED = tag("infested_cobblestone"); + public static final TagKey COBBLESTONE_MOSSY = tag("mossy_cobblestone"); + public static final TagKey COBBLESTONE_DEEPSLATE = tag("deepslate_cobblestone"); + public static final TagKey CROPS = tag("crops"); + public static final TagKey CROPS_BEETROOT = tag("crops/beetroot"); + public static final TagKey CROPS_CARROT = tag("crops/carrot"); + public static final TagKey CROPS_NETHER_WART = tag("crops/nether_wart"); + public static final TagKey CROPS_POTATO = tag("crops/potato"); + public static final TagKey CROPS_WHEAT = tag("crops/wheat"); + public static final TagKey DUSTS = tag("dusts"); + public static final TagKey DUSTS_PRISMARINE = tag("dusts/prismarine"); + public static final TagKey DUSTS_REDSTONE = tag("dusts/redstone"); + public static final TagKey DUSTS_GLOWSTONE = tag("dusts/glowstone"); + + public static final TagKey DYES = tag("dyes"); + public static final TagKey DYES_BLACK = ((AccessDyeColor) (Object) DyeColor.BLACK).getTag(); + public static final TagKey DYES_RED = ((AccessDyeColor) (Object) DyeColor.RED).getTag(); + public static final TagKey DYES_GREEN = ((AccessDyeColor) (Object) DyeColor.GREEN).getTag(); + public static final TagKey DYES_BROWN = ((AccessDyeColor) (Object) DyeColor.BROWN).getTag(); + public static final TagKey DYES_BLUE = ((AccessDyeColor) (Object) DyeColor.BLUE).getTag(); + public static final TagKey DYES_PURPLE = ((AccessDyeColor) (Object) DyeColor.PURPLE).getTag(); + public static final TagKey DYES_CYAN = ((AccessDyeColor) (Object) DyeColor.CYAN).getTag(); + public static final TagKey DYES_LIGHT_GRAY = ((AccessDyeColor) (Object) DyeColor.LIGHT_GRAY).getTag(); + public static final TagKey DYES_GRAY = ((AccessDyeColor) (Object) DyeColor.GRAY).getTag(); + public static final TagKey DYES_PINK = ((AccessDyeColor) (Object) DyeColor.PINK).getTag(); + public static final TagKey DYES_LIME = ((AccessDyeColor) (Object) DyeColor.LIME).getTag(); + public static final TagKey DYES_YELLOW = ((AccessDyeColor) (Object) DyeColor.YELLOW).getTag(); + public static final TagKey DYES_LIGHT_BLUE = ((AccessDyeColor) (Object) DyeColor.LIGHT_BLUE).getTag(); + public static final TagKey DYES_MAGENTA = ((AccessDyeColor) (Object) DyeColor.MAGENTA).getTag(); + public static final TagKey DYES_ORANGE = ((AccessDyeColor) (Object) DyeColor.ORANGE).getTag(); + public static final TagKey DYES_WHITE = ((AccessDyeColor) (Object) DyeColor.WHITE).getTag(); + + public static final TagKey EGGS = tag("eggs"); + /** + * This tag defaults to {@link net.minecraft.world.item.Items#LAPIS_LAZULI} when not present in any datapacks, including forge client on vanilla server + */ + public static final TagKey ENCHANTING_FUELS = tag("enchanting_fuels"); + public static final TagKey END_STONES = tag("end_stones"); + public static final TagKey ENDER_PEARLS = tag("ender_pearls"); + public static final TagKey FEATHERS = tag("feathers"); + public static final TagKey FENCE_GATES = tag("fence_gates"); + public static final TagKey FENCE_GATES_WOODEN = tag("wooden_fence_gates"); + public static final TagKey FENCES = tag("fences"); + public static final TagKey FENCES_NETHER_BRICK = tag("nether_brick_fences"); + public static final TagKey FENCES_WOODEN = tag("wooden_fences"); + public static final TagKey GEMS = tag("gems"); + public static final TagKey GEMS_DIAMOND = ConventionalItemTags.DIAMONDS; + public static final TagKey GEMS_EMERALD = ConventionalItemTags.EMERALDS; + public static final TagKey GEMS_AMETHYST = tag("amethyst"); + public static final TagKey GEMS_LAPIS = ConventionalItemTags.LAPIS; + public static final TagKey GEMS_PRISMARINE = tag("prismarine"); + public static final TagKey GEMS_QUARTZ = ConventionalItemTags.QUARTZ; + + public static final TagKey GLASS = ConventionalItemTags.GLASS_BLOCKS; + public static final TagKey GLASS_BLACK = tag("black_glass"); + public static final TagKey GLASS_BLUE = tag("blue_glass"); + public static final TagKey GLASS_BROWN = tag("brown_glass"); + public static final TagKey GLASS_COLORLESS = tag("colorless_glass"); + public static final TagKey GLASS_CYAN = tag("cyan_glass"); + public static final TagKey GLASS_GRAY = tag("gray_glass"); + public static final TagKey GLASS_GREEN = tag("green_glass"); + public static final TagKey GLASS_LIGHT_BLUE = tag("light_blue_glass"); + public static final TagKey GLASS_LIGHT_GRAY = tag("light_gray_glass"); + public static final TagKey GLASS_LIME = tag("lime_glass"); + public static final TagKey GLASS_MAGENTA = tag("magenta_glass"); + public static final TagKey GLASS_ORANGE = tag("orange_glass"); + public static final TagKey GLASS_PINK = tag("pink_glass"); + public static final TagKey GLASS_PURPLE = tag("purple_glass"); + public static final TagKey GLASS_RED = tag("red_glass"); + /** + * Glass which is made from sand and only minor additional ingredients like dyes + */ + public static final TagKey GLASS_SILICA = tag("silica_glass"); + public static final TagKey GLASS_TINTED = tag("tinted_glass"); + public static final TagKey GLASS_WHITE = tag("white_glass"); + public static final TagKey GLASS_YELLOW = tag("yellow_glass"); + + public static final TagKey GLASS_PANES = ConventionalItemTags.GLASS_PANES; + public static final TagKey GLASS_PANES_BLACK = tag("black_glass_panes"); + public static final TagKey GLASS_PANES_BLUE = tag("blue_glass_panes"); + public static final TagKey GLASS_PANES_BROWN = tag("brown_glass_panes"); + public static final TagKey GLASS_PANES_COLORLESS = tag("colorless_glass_panes"); + public static final TagKey GLASS_PANES_CYAN = tag("cyan_glass_panes"); + public static final TagKey GLASS_PANES_GRAY = tag("gray_glass_panes"); + public static final TagKey GLASS_PANES_GREEN = tag("green_glass_panes"); + public static final TagKey GLASS_PANES_LIGHT_BLUE = tag("light_blue_glass_panes"); + public static final TagKey GLASS_PANES_LIGHT_GRAY = tag("light_gray_glass_panes"); + public static final TagKey GLASS_PANES_LIME = tag("lime_glass_panes"); + public static final TagKey GLASS_PANES_MAGENTA = tag("magenta_glass_panes"); + public static final TagKey GLASS_PANES_ORANGE = tag("orange_glass_panes"); + public static final TagKey GLASS_PANES_PINK = tag("pink_glass_panes"); + public static final TagKey GLASS_PANES_PURPLE = tag("purple_glass_panes"); + public static final TagKey GLASS_PANES_RED = tag("red_glass_panes"); + public static final TagKey GLASS_PANES_WHITE = tag("white_glass_panes"); + public static final TagKey GLASS_PANES_YELLOW = tag("yellow_glass_panes"); + + public static final TagKey GRAVEL = tag("gravel"); + public static final TagKey GUNPOWDER = tag("gunpowder"); + public static final TagKey HEADS = tag("heads"); + public static final TagKey INGOTS = tag("ingots"); + public static final TagKey INGOTS_BRICK = tag("brick_ingots"); + public static final TagKey INGOTS_COPPER = tag("copper_ingots"); + public static final TagKey INGOTS_GOLD = tag("gold_ingots"); + public static final TagKey INGOTS_IRON = ConventionalItemTags.IRON_INGOTS; + public static final TagKey INGOTS_NETHERITE = ConventionalItemTags.NETHERITE_INGOTS; + public static final TagKey INGOTS_NETHER_BRICK = tag("nether_brick_ingots"); + public static final TagKey LEATHER = tag("leather"); + public static final TagKey MUSHROOMS = tag("mushrooms"); + public static final TagKey NETHER_STARS = tag("nether_stars"); + public static final TagKey NETHERRACK = tag("netherrack"); + public static final TagKey NUGGETS = tag("nuggets"); + public static final TagKey NUGGETS_GOLD = tag("gold_nuggets"); + public static final TagKey NUGGETS_IRON = tag("iron_nuggets"); + public static final TagKey OBSIDIAN = tag("obsidian"); + /** + * Blocks which are often replaced by deepslate ores, i.e. the ores in the tag {@link #ORES_IN_GROUND_DEEPSLATE}, during world generation + */ + public static final TagKey ORE_BEARING_GROUND_DEEPSLATE = tag("ore_bearing_ground/deepslate"); + /** + * Blocks which are often replaced by netherrack ores, i.e. the ores in the tag {@link #ORES_IN_GROUND_NETHERRACK}, during world generation + */ + public static final TagKey ORE_BEARING_GROUND_NETHERRACK = tag("ore_bearing_ground/netherrack"); + /** + * Blocks which are often replaced by stone ores, i.e. the ores in the tag {@link #ORES_IN_GROUND_STONE}, during world generation + */ + public static final TagKey ORE_BEARING_GROUND_STONE = tag("ore_bearing_ground/stone"); + /** + * Ores which on average result in more than one resource worth of materials + */ + public static final TagKey ORE_RATES_DENSE = tag("ore_rates/dense"); + /** + * Ores which on average result in one resource worth of materials + */ + public static final TagKey ORE_RATES_SINGULAR = tag("ore_rates/singular"); + /** + * Ores which on average result in less than one resource worth of materials + */ + public static final TagKey ORE_RATES_SPARSE = tag("ore_rates/sparse"); + public static final TagKey ORES = ConventionalItemTags.ORES; + public static final TagKey ORES_COAL = tag("coal_ores"); + public static final TagKey ORES_COPPER = tag("copper_ores"); + public static final TagKey ORES_DIAMOND = tag("diamond_ores"); + public static final TagKey ORES_EMERALD = tag("emerald_ores"); + public static final TagKey ORES_GOLD = tag("gold_ores"); + public static final TagKey ORES_IRON = tag("iron_ores"); + public static final TagKey ORES_LAPIS = tag("lapis_ores"); + public static final TagKey ORES_NETHERITE_SCRAP = tag("netherite_scrap_ores"); + public static final TagKey ORES_QUARTZ = ConventionalItemTags.QUARTZ_ORES; + public static final TagKey ORES_REDSTONE = tag("redstone_ores"); + /** + * Ores in deepslate (or in equivalent blocks in the tag {@link #ORE_BEARING_GROUND_DEEPSLATE}) which could logically use deepslate as recipe input or output + */ + public static final TagKey ORES_IN_GROUND_DEEPSLATE = tag("ores_in_ground/deepslate"); + /** + * Ores in netherrack (or in equivalent blocks in the tag {@link #ORE_BEARING_GROUND_NETHERRACK}) which could logically use netherrack as recipe input or output + */ + public static final TagKey ORES_IN_GROUND_NETHERRACK = tag("ores_in_ground/netherrack"); + /** + * Ores in stone (or in equivalent blocks in the tag {@link #ORE_BEARING_GROUND_STONE}) which could logically use stone as recipe input or output + */ + public static final TagKey ORES_IN_GROUND_STONE = tag("ores_in_ground/stone"); + public static final TagKey RAW_MATERIALS = tag("raw_materials"); + public static final TagKey RAW_MATERIALS_COPPER = tag("copper_raw_materials"); + public static final TagKey RAW_MATERIALS_GOLD = tag("gold_raw_materials"); + public static final TagKey RAW_MATERIALS_IRON = tag("iron_raw_materials"); + public static final TagKey RODS = tag("rods"); + public static final TagKey RODS_BLAZE = tag("blaze_rods"); + public static final TagKey RODS_WOODEN = tag("wooden_rods"); + + public static final TagKey SAND = tag("sand"); + public static final TagKey SAND_COLORLESS = tag("colorless_sand"); + public static final TagKey SAND_RED = tag("red_sand"); + + public static final TagKey SANDSTONE = tag("sandstone"); + public static final TagKey SEEDS = tag("seeds"); + public static final TagKey SEEDS_BEETROOT = tag("beetroot_seeds"); + public static final TagKey SEEDS_MELON = tag("melon_seeds"); + public static final TagKey SEEDS_PUMPKIN = tag("pumpkin_seeds"); + public static final TagKey SEEDS_WHEAT = tag("wheat_seeds"); + public static final TagKey SHEARS = ConventionalItemTags.SHEARS; + public static final TagKey SLIMEBALLS = tag("slimeballs"); + public static final TagKey STAINED_GLASS = tag("stained_glass"); + public static final TagKey STAINED_GLASS_PANES = tag("stained_glass_panes"); + public static final TagKey STONE = tag("stone"); + public static final TagKey STORAGE_BLOCKS = tag("storage_blocks"); + public static final TagKey STORAGE_BLOCKS_AMETHYST = tag("amethyst_blocks"); + public static final TagKey STORAGE_BLOCKS_COAL = tag("coal_blocks"); + public static final TagKey STORAGE_BLOCKS_COPPER = tag("copper_blocks"); + public static final TagKey STORAGE_BLOCKS_DIAMOND = tag("diamond_blocks"); + public static final TagKey STORAGE_BLOCKS_EMERALD = tag("emerald_blocks"); + public static final TagKey STORAGE_BLOCKS_GOLD = tag("gold_blocks"); + public static final TagKey STORAGE_BLOCKS_IRON = tag("iron_blocks"); + public static final TagKey STORAGE_BLOCKS_LAPIS = tag("lapis_blocks"); + public static final TagKey STORAGE_BLOCKS_NETHERITE = tag("netherite_blocks"); + public static final TagKey STORAGE_BLOCKS_QUARTZ = tag("quartz_blocks"); + public static final TagKey STORAGE_BLOCKS_RAW_COPPER = ConventionalItemTags.RAW_COPPER_BLOCKS; + public static final TagKey STORAGE_BLOCKS_RAW_GOLD = ConventionalItemTags.RAW_GOLD_BLOCKS; + public static final TagKey STORAGE_BLOCKS_RAW_IRON = ConventionalItemTags.RAW_IRON_BLOCKS; + public static final TagKey STORAGE_BLOCKS_REDSTONE = tag("redstone_blocks"); + public static final TagKey STRING = tag("string"); + /** + * A tag containing all existing tools. + */ + public static final TagKey TOOLS = tag("tools"); + /** + * A tag containing all existing swords. + */ + public static final TagKey TOOLS_SWORDS = ConventionalItemTags.SWORDS; + /** + * A tag containing all existing axes. + */ + public static final TagKey TOOLS_AXES = ConventionalItemTags.AXES; + /** + * A tag containing all existing pickaxes. + */ + public static final TagKey TOOLS_PICKAXES = ConventionalItemTags.PICKAXES; + /** + * A tag containing all existing shovels. + */ + public static final TagKey TOOLS_SHOVELS = ConventionalItemTags.SHOVELS; + /** + * A tag containing all existing hoes. + */ + public static final TagKey TOOLS_HOES = ConventionalItemTags.HOES; + /** + * A tag containing all existing shields. + */ + public static final TagKey TOOLS_SHIELDS = tag("shields"); + /** + * A tag containing all existing bows. + */ + public static final TagKey TOOLS_BOWS = ConventionalItemTags.BOWS; + /** + * A tag containing all existing crossbows. + */ + public static final TagKey TOOLS_CROSSBOWS = tag("crossbows"); + /** + * A tag containing all existing fishing rods. + */ + public static final TagKey TOOLS_FISHING_RODS = tag("fishing_rods"); + /** + * A tag containing all existing tridents. + */ + public static final TagKey TOOLS_TRIDENTS = tag("tridents"); + /** + * A tag containing all existing armors. + */ + public static final TagKey ARMORS = tag("armors"); + /** + * A tag containing all existing helmets. + */ + public static final TagKey ARMORS_HELMETS = tag("helmets"); + /** + * A tag containing all chestplates. + */ + public static final TagKey ARMORS_CHESTPLATES = tag("chestplates"); + /** + * A tag containing all existing leggings. + */ + public static final TagKey ARMORS_LEGGINGS = tag("leggings"); + /** + * A tag containing all existing boots. + */ + public static final TagKey ARMORS_BOOTS = tag("boots"); + + private static TagKey tag(String name, @Nullable Set> defaults) { + return TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation("c", name)); + } + + private static TagKey tag(String name) { + return tag(name, null); + } + } + + public static class Fluids { + /** + * Holds all fluids related to milk. + */ + public static final TagKey MILK = tag("milk"); + /** + * Holds all fluids that are gaseous at room temperature. + */ + public static final TagKey GASEOUS = tag("gaseous"); + + private static TagKey tag(String name) { + return TagKey.create(Registry.FLUID_REGISTRY, new ResourceLocation("c", name)); + } + } + + public static class Biomes { + public static final TagKey IS_HOT = tag("is_hot"); + public static final TagKey IS_HOT_OVERWORLD = tag("is_hot/overworld"); + public static final TagKey IS_HOT_NETHER = tag("is_hot/nether"); + public static final TagKey IS_HOT_END = tag("is_hot/end"); + + public static final TagKey IS_COLD = tag("is_cold"); + public static final TagKey IS_COLD_OVERWORLD = tag("is_cold/overworld"); + public static final TagKey IS_COLD_NETHER = tag("is_cold/nether"); + public static final TagKey IS_COLD_END = tag("is_cold/end"); + + public static final TagKey IS_SPARSE = tag("is_sparse"); + public static final TagKey IS_SPARSE_OVERWORLD = tag("is_sparse/overworld"); + public static final TagKey IS_SPARSE_NETHER = tag("is_sparse/nether"); + public static final TagKey IS_SPARSE_END = tag("is_sparse/end"); + public static final TagKey IS_DENSE = tag("is_dense"); + public static final TagKey IS_DENSE_OVERWORLD = tag("is_dense/overworld"); + public static final TagKey IS_DENSE_NETHER = tag("is_dense/nether"); + public static final TagKey IS_DENSE_END = tag("is_dense/end"); + + public static final TagKey IS_WET = tag("is_wet"); + public static final TagKey IS_WET_OVERWORLD = tag("is_wet/overworld"); + public static final TagKey IS_WET_NETHER = tag("is_wet/nether"); + public static final TagKey IS_WET_END = tag("is_wet/end"); + public static final TagKey IS_DRY = tag("is_dry"); + public static final TagKey IS_DRY_OVERWORLD = tag("is_dry/overworld"); + public static final TagKey IS_DRY_NETHER = tag("is_dry/nether"); + public static final TagKey IS_DRY_END = tag("is_dry/end"); + + public static final TagKey IS_CONIFEROUS = tag("is_coniferous"); + + public static final TagKey IS_SPOOKY = tag("is_spooky"); + public static final TagKey IS_DEAD = tag("is_dead"); + public static final TagKey IS_LUSH = tag("is_lush"); + public static final TagKey IS_MUSHROOM = tag("is_mushroom"); + public static final TagKey IS_MAGICAL = tag("is_magical"); + public static final TagKey IS_RARE = tag("is_rare"); + public static final TagKey IS_PLATEAU = tag("is_plateau"); + public static final TagKey IS_MODIFIED = tag("is_modified"); + + public static final TagKey IS_WATER = tag("is_water"); + public static final TagKey IS_DESERT = tag("is_desert"); + public static final TagKey IS_PLAINS = tag("is_plains"); + public static final TagKey IS_SWAMP = tag("is_swamp"); + public static final TagKey IS_SANDY = tag("is_sandy"); + public static final TagKey IS_SNOWY = tag("is_snowy"); + public static final TagKey IS_WASTELAND = tag("is_wasteland"); + public static final TagKey IS_VOID = tag("is_void"); + public static final TagKey IS_UNDERGROUND = tag("is_underground"); + + public static final TagKey IS_CAVE = tag("is_cave"); + public static final TagKey IS_PEAK = tag("is_peak"); + public static final TagKey IS_SLOPE = tag("is_slope"); + public static final TagKey IS_MOUNTAIN = tag("is_mountain"); + + private static TagKey tag(String name) { + return TagKey.create(Registry.BIOME_REGISTRY, new ResourceLocation("c", name)); + } + } +} diff --git a/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesireBuiltinRegistration.java b/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesireBuiltinRegistration.java index 27a3a886..e2797401 100644 --- a/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesireBuiltinRegistration.java +++ b/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesireBuiltinRegistration.java @@ -1,24 +1,22 @@ package uwu.lopyluna.create_dd.infrastructure.world; import com.simibubi.create.infrastructure.worldgen.OreFeatureConfigEntry; + +import dev.architectury.registry.registries.DeferredRegister; import net.minecraft.core.Registry; import net.minecraft.data.BuiltinRegistries; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.placement.PlacedFeature; -import net.minecraftforge.common.world.BiomeModifier; -import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.ForgeRegistries; import java.util.Map; import static uwu.lopyluna.create_dd.Desires.MOD_ID; public class DesireBuiltinRegistration { - private static final DeferredRegister> CONFIGURED_FEATURE_REGISTER = DeferredRegister.create(Registry.CONFIGURED_FEATURE_REGISTRY, MOD_ID); - private static final DeferredRegister PLACED_FEATURE_REGISTER = DeferredRegister.create(Registry.PLACED_FEATURE_REGISTRY, MOD_ID); - private static final DeferredRegister BIOME_MODIFIER_REGISTER = DeferredRegister.create(ForgeRegistries.Keys.BIOME_MODIFIERS, MOD_ID); + private static final DeferredRegister> CONFIGURED_FEATURE_REGISTER = DeferredRegister.create(MOD_ID, Registry.CONFIGURED_FEATURE_REGISTRY); + private static final DeferredRegister PLACED_FEATURE_REGISTER = DeferredRegister.create(MOD_ID, Registry.PLACED_FEATURE_REGISTRY); + // private static final DeferredRegister BIOME_MODIFIER_REGISTER = DeferredRegister.create(Registry.Keys.BIOME_MODIFIERS, MOD_ID); static { for (Map.Entry entry : OreFeatureConfigEntry.ALL.entrySet()) { @@ -28,15 +26,15 @@ public class DesireBuiltinRegistration { if (datagenExt != null) { CONFIGURED_FEATURE_REGISTER.register(id.getPath(), () -> datagenExt.createConfiguredFeature(BuiltinRegistries.ACCESS)); PLACED_FEATURE_REGISTER.register(id.getPath(), () -> datagenExt.createPlacedFeature(BuiltinRegistries.ACCESS)); - BIOME_MODIFIER_REGISTER.register(id.getPath(), () -> datagenExt.createBiomeModifier(BuiltinRegistries.ACCESS)); + // BIOME_MODIFIER_REGISTER.register(id.getPath(), () -> datagenExt.createBiomeModifier(BuiltinRegistries.ACCESS)); // TODO } } } } - public static void register(IEventBus modEventBus) { - CONFIGURED_FEATURE_REGISTER.register(modEventBus); - PLACED_FEATURE_REGISTER.register(modEventBus); - BIOME_MODIFIER_REGISTER.register(modEventBus); + public static void register() { + CONFIGURED_FEATURE_REGISTER.register(); + PLACED_FEATURE_REGISTER.register(); + // BIOME_MODIFIER_REGISTER.register(modEventBus); // TODO } } diff --git a/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesiresFeatures.java b/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesiresFeatures.java index f492fdb5..d014b9ae 100644 --- a/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesiresFeatures.java +++ b/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesiresFeatures.java @@ -2,22 +2,23 @@ import com.simibubi.create.infrastructure.worldgen.LayeredOreFeature; import com.simibubi.create.infrastructure.worldgen.StandardOreFeature; + +import dev.architectury.registry.registries.DeferredRegister; +import dev.architectury.registry.registries.RegistrySupplier; +import net.minecraft.core.Registry; +import net.minecraft.data.BuiltinRegistries; import net.minecraft.world.level.levelgen.feature.Feature; -import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.RegistryObject; import static uwu.lopyluna.create_dd.Desires.MOD_ID; @SuppressWarnings("unused") public class DesiresFeatures { - private static final DeferredRegister> REGISTER = DeferredRegister.create(ForgeRegistries.FEATURES, MOD_ID); + private static final DeferredRegister> REGISTER = DeferredRegister.create(MOD_ID, Registry.FEATURE_REGISTRY); - public static final RegistryObject STANDARD_ORE = REGISTER.register("standard_ore", StandardOreFeature::new); - public static final RegistryObject LAYERED_ORE = REGISTER.register("layered_ore", LayeredOreFeature::new); + public static final RegistrySupplier STANDARD_ORE = REGISTER.register("standard_ore", StandardOreFeature::new); + public static final RegistrySupplier LAYERED_ORE = REGISTER.register("layered_ore", LayeredOreFeature::new); - public static void register(IEventBus modEventBus) { - REGISTER.register(modEventBus); + public static void register() { + REGISTER.register(); } } diff --git a/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesiresPlacementModifiers.java b/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesiresPlacementModifiers.java index 26e45871..4bec4c16 100644 --- a/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesiresPlacementModifiers.java +++ b/common/src/main/java/uwu/lopyluna/create_dd/infrastructure/world/DesiresPlacementModifiers.java @@ -1,20 +1,20 @@ package uwu.lopyluna.create_dd.infrastructure.world; import com.simibubi.create.infrastructure.worldgen.ConfigDrivenPlacement; + +import dev.architectury.registry.registries.DeferredRegister; +import dev.architectury.registry.registries.RegistrySupplier; import net.minecraft.core.Registry; import net.minecraft.world.level.levelgen.placement.PlacementModifierType; -import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.RegistryObject; import static uwu.lopyluna.create_dd.Desires.MOD_ID; public class DesiresPlacementModifiers { - private static final DeferredRegister> REGISTER = DeferredRegister.create(Registry.PLACEMENT_MODIFIER_REGISTRY, MOD_ID); + private static final DeferredRegister> REGISTER = DeferredRegister.create(MOD_ID, Registry.PLACEMENT_MODIFIER_REGISTRY); - public static final RegistryObject> CONFIG_DRIVEN = REGISTER.register("config_driven", () -> () -> CDrivenPlacement.CODEC); + public static final RegistrySupplier> CONFIG_DRIVEN = REGISTER.register("config_driven", () -> () -> CDrivenPlacement.CODEC); - public static void register(IEventBus modEventBus) { - REGISTER.register(modEventBus); + public static void register() { + REGISTER.register(); } } diff --git a/common/src/main/java/uwu/lopyluna/create_dd/mixins/MixinDyeColor.java b/common/src/main/java/uwu/lopyluna/create_dd/mixins/MixinDyeColor.java new file mode 100644 index 00000000..32b88bbe --- /dev/null +++ b/common/src/main/java/uwu/lopyluna/create_dd/mixins/MixinDyeColor.java @@ -0,0 +1,36 @@ +package uwu.lopyluna.create_dd.mixins; + +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import net.minecraft.core.Registry; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.material.MaterialColor; +import uwu.lopyluna.create_dd.access.AccessDyeColor; + +@Mixin(DyeColor.class) +public class MixinDyeColor implements AccessDyeColor { + @Shadow + @Final + private String name; + @Unique + private TagKey tag; + + @Inject(method = "", at = @At("TAIL")) + public void addTag(String woolId, int id, int color, String mapColor, int fireworkColor, MaterialColor signColor, int j, int k, CallbackInfo ci) { + tag = TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation("c", name + "_dyes")); + } + + @Override + public TagKey getTag() { + return tag; + } +} diff --git a/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresBlocks.java b/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresBlocks.java index 29dab0cb..e186dd28 100644 --- a/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresBlocks.java +++ b/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresBlocks.java @@ -36,8 +36,6 @@ import net.minecraft.world.level.material.MaterialColor; import net.minecraftforge.client.model.generators.ConfiguredModel; import net.minecraftforge.client.model.generators.ModelFile; -import net.minecraftforge.common.Tags; -import net.minecraftforge.common.util.ForgeSoundType; import uwu.lopyluna.create_dd.Desires; import uwu.lopyluna.create_dd.DesireUtil; import uwu.lopyluna.create_dd.content.blocks.contraptions.bore_block.BoreBlock; @@ -70,6 +68,7 @@ import uwu.lopyluna.create_dd.content.blocks.logistics.item_stockpile.ItemStockpileBlock; import uwu.lopyluna.create_dd.content.blocks.logistics.item_stockpile.ItemStockpileCTBehaviour; import uwu.lopyluna.create_dd.content.blocks.logistics.item_stockpile.ItemStockpileItem; +import uwu.lopyluna.create_dd.infrastructure.utility.ForgeTags; import java.util.function.Consumer; @@ -202,9 +201,9 @@ public class DesiresBlocks { public static final BlockEntry BORE_BLOCK = REGISTRATE.block("bore_block", BoreBlock::new) .initialProperties(SharedProperties::stone) .properties(p -> p.color(MaterialColor.STONE)) - .properties(p -> p.sound(new ForgeSoundType(0.9f, 1.25f, () -> SoundEvents.NETHERITE_BLOCK_BREAK, - () -> SoundEvents.NETHERITE_BLOCK_STEP, () -> SoundEvents.NETHERITE_BLOCK_PLACE, - () -> SoundEvents.NETHERITE_BLOCK_HIT, () -> SoundEvents.NETHERITE_BLOCK_FALL))) + .properties(p -> p.sound(new SoundType(0.9f, 1.25f, SoundEvents.NETHERITE_BLOCK_BREAK, + SoundEvents.NETHERITE_BLOCK_STEP, SoundEvents.NETHERITE_BLOCK_PLACE, + SoundEvents.NETHERITE_BLOCK_HIT, SoundEvents.NETHERITE_BLOCK_FALL))) .onRegister(movementBehaviour(new BoreBlockMovementBehaviour())) .transform(pickaxeOnly()) .recipe((c, p) -> { @@ -504,9 +503,9 @@ public class DesiresBlocks { ShapedRecipeBuilder.shaped(c.get(), 1) .define('B', AllTags.forgeItemTag("plates/iron")) - .define('C', Tags.Items.BARRELS_WOODEN) + .define('C', ForgeTags.Items.BARRELS_WOODEN) .pattern("BCB") - .unlockedBy("has_" + getItemName(Items.BARREL.asItem()), has(Tags.Items.BARRELS_WOODEN)) + .unlockedBy("has_" + getItemName(Items.BARREL.asItem()), has(ForgeTags.Items.BARRELS_WOODEN)) .save(p, DesireUtil.asResource("crafting/kinetics/" + c.getName())); }) .tab(() -> DesiresCreativeModeTabs.BASE_CREATIVE_TAB) @@ -528,9 +527,9 @@ public class DesiresBlocks { ShapedRecipeBuilder.shaped(c.get(), 1) .define('B', AllTags.forgeItemTag("plates/copper")) - .define('C', Tags.Items.BARRELS_WOODEN) + .define('C', ForgeTags.Items.BARRELS_WOODEN) .pattern("BCB") - .unlockedBy("has_" + getItemName(Items.BARREL.asItem()), has(Tags.Items.BARRELS_WOODEN)) + .unlockedBy("has_" + getItemName(Items.BARREL.asItem()), has(ForgeTags.Items.BARRELS_WOODEN)) .save(p, DesireUtil.asResource("crafting/kinetics/" + c.getName())); }) .tab(() -> DesiresCreativeModeTabs.BASE_CREATIVE_TAB) diff --git a/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresEntityDataSerializers.java b/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresEntityDataSerializers.java index ad9759aa..1dcdf60c 100644 --- a/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresEntityDataSerializers.java +++ b/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresEntityDataSerializers.java @@ -1,16 +1,10 @@ package uwu.lopyluna.create_dd.registry; -import net.minecraft.network.syncher.EntityDataSerializer; -import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.registries.DeferredRegister; -import net.minecraftforge.registries.ForgeRegistries; -import uwu.lopyluna.create_dd.Desires; - - public class DesiresEntityDataSerializers { - private static final DeferredRegister> REGISTER = DeferredRegister.create(ForgeRegistries.Keys.ENTITY_DATA_SERIALIZERS, Desires.MOD_ID); + // TODO - also, is this even used? + // private static final DeferredRegister> REGISTER = DeferredRegister.create(Desires.MOD_ID, Registry.Keys.ENTITY_DATA_SERIALIZERS); - public static void register(IEventBus modEventBus) { - REGISTER.register(modEventBus); - } + // public static void register(IEventBus modEventBus) { + // REGISTER.register(modEventBus); + // } } diff --git a/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresFluids.java b/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresFluids.java index ecde4864..170f9a28 100644 --- a/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresFluids.java +++ b/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresFluids.java @@ -23,12 +23,6 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.FluidState; -import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; -import net.minecraftforge.common.ForgeMod; -import net.minecraftforge.fluids.FluidInteractionRegistry; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.FluidType; -import net.minecraftforge.fluids.ForgeFlowingFluid; import org.jetbrains.annotations.NotNull; import uwu.lopyluna.create_dd.infrastructure.config.DesiresConfigs; diff --git a/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresItems.java b/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresItems.java index 0e210301..5d6a81ab 100644 --- a/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresItems.java +++ b/common/src/main/java/uwu/lopyluna/create_dd/registry/DesiresItems.java @@ -16,7 +16,6 @@ import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.level.ItemLike; -import net.minecraftforge.registries.ForgeRegistries; import uwu.lopyluna.create_dd.Desires; import uwu.lopyluna.create_dd.DesireUtil; import uwu.lopyluna.create_dd.content.blocks.kinetics.modular_drill.ModularDrillHeadItem; diff --git a/common/src/main/resources/create_dd-common.mixins.json b/common/src/main/resources/create_dd-common.mixins.json index 3319cdba..d652c0c3 100644 --- a/common/src/main/resources/create_dd-common.mixins.json +++ b/common/src/main/resources/create_dd-common.mixins.json @@ -11,6 +11,7 @@ "MixinBlockFluidResBlock", "MixinClutchBlock", "MixinClutchBlockEntity", + "MixinDyeColor", "MixinFluidPipeBlock", "MixinFluidPropagator", "MixinForgeHooks", diff --git a/fabric/build.gradle.kts b/fabric/build.gradle.kts index 5bb2ebf8..0c4240f3 100644 --- a/fabric/build.gradle.kts +++ b/fabric/build.gradle.kts @@ -37,6 +37,8 @@ dependencies { modLocalRuntime("maven.modrinth:lazydfu:${"lazydfu_version"()}") modLocalRuntime("com.terraformersmc:modmenu:${"modmenu_version"()}") modLocalRuntime("dev.emi:emi-fabric:${"emi_version"()}") + + modApi("dev.architectury:architectury-fabric:${"architectury_version"()}") } operator fun String.invoke(): String { diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index caca8ed1..542a2ffc 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -29,6 +29,8 @@ dependencies { compileOnly("io.github.llamalad7:mixinextras-common:${"mixin_extras_version"()}") annotationProcessor(implementation(include("io.github.llamalad7:mixinextras-forge:${"mixin_extras_version"()}")!!)!!) + + modApi("dev.architectury:architectury-forge:${"architectury_version"()}") { isTransitive = false } } operator fun String.invoke(): String { diff --git a/gradle.properties b/gradle.properties index 07e22fcf..c5021d71 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,6 +22,7 @@ parchment_version = 2022.11.27 # Common mixin_extras_version = 0.3.5 +architectury_version = 6.6.92 # Dev QoL fabric_recipe_viewer = emi