From 545bf33d68ff27f8e72973441a8f83d5ad3d1f59 Mon Sep 17 00:00:00 2001 From: LimePotato Date: Sat, 4 Nov 2023 18:02:49 -0600 Subject: [PATCH] oof --- gradle.properties | 2 +- gradle/libs.versions.toml | 15 ++++---- gradle/wrapper/gradle-wrapper.properties | 2 +- .../java/xyz/limepot/roses_mod/RosesMod.java | 37 ++++++++----------- .../world/gen/ModFlowerGeneration.java | 8 ++-- .../{cyan_rose_flower.json => cyan_rose.json} | 2 +- src/main/resources/quilt.mod.json | 6 +-- 7 files changed, 32 insertions(+), 40 deletions(-) rename src/main/resources/data/roses_mod/loot_tables/blocks/{cyan_rose_flower.json => cyan_rose.json} (77%) diff --git a/gradle.properties b/gradle.properties index 02ee59e..c7fe3f6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx1G org.gradle.parallel = true # Mod Properties -version = 3.0.7 +version = 1.0.0-1.18 maven_group = xyz.limepot archives_base_name = roses_mod diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 346f265..fbefca2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,10 +1,10 @@ [versions] # The latest versions are available at https://lambdaurora.dev/tools/import_quilt.html -minecraft = "1.20.1" -quilt_mappings = "1.20.1+build.1" -quilt_loader = "0.19.1" +minecraft = "1.18.2" +quilt_mappings = "1.18.2+build.26" +quilt_loader = "0.17.0" -quilted_fabric_api = "7.0.3+0.83.1-1.20.1" +quilted_fabric_api = "1.0.0-beta.28+0.67.0-1.18.2" [libraries] minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" } @@ -12,11 +12,10 @@ quilt_mappings = { module = "org.quiltmc:quilt-mappings", version.ref = "quilt_m quilt_loader = { module = "org.quiltmc:quilt-loader", version.ref = "quilt_loader" } quilted_fabric_api = { module = "org.quiltmc.quilted-fabric-api:quilted-fabric-api", version.ref = "quilted_fabric_api" } -quilted_fabric_api_deprecated = { module = "org.quiltmc.quilted-fabric-api:quilted-fabric-api-deprecated", version.ref = "quilted_fabric_api" } # If you have multiple similar dependencies, you can declare a dependency bundle and reference it on the build script with "libs.bundles.example". -[bundles] -quilted_fabric_api = ["quilted_fabric_api", "quilted_fabric_api_deprecated"] +# [bundles] +# example = ["example-a", "example-b", "example-c"] [plugins] -quilt_loom = { id = "org.quiltmc.loom", version = "1.2.+" } +quilt_loom = { id = "org.quiltmc.loom", version = "1.4.1" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d..744c64d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/xyz/limepot/roses_mod/RosesMod.java b/src/main/java/xyz/limepot/roses_mod/RosesMod.java index 8754b16..b42cfce 100644 --- a/src/main/java/xyz/limepot/roses_mod/RosesMod.java +++ b/src/main/java/xyz/limepot/roses_mod/RosesMod.java @@ -1,18 +1,15 @@ package xyz.limepot.roses_mod; -import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; import net.fabricmc.fabric.api.loot.v2.LootTableEvents; import net.minecraft.block.*; import net.minecraft.entity.effect.StatusEffects; import net.minecraft.item.BlockItem; -import net.minecraft.item.ItemGroups; -import net.minecraft.item.Items; +import net.minecraft.item.Item; import net.minecraft.loot.LootPool; import net.minecraft.loot.entry.ItemEntry; import net.minecraft.loot.provider.number.ConstantLootNumberProvider; -import net.minecraft.registry.Registries; -import net.minecraft.registry.Registry; import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; import net.minecraft.world.gen.GenerationStep; import org.quiltmc.loader.api.ModContainer; import org.quiltmc.qsl.base.api.entrypoint.ModInitializer; @@ -47,31 +44,31 @@ public class RosesMod implements ModInitializer { ModFlowerGeneration.generateFlowers(); //BIOME MOD - BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.VEGETAL_DECORATION, ROSE_FLOWER_PLACED_KEY); - BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.VEGETAL_DECORATION, CYAN_ROSE_FLOWER_PLACED_KEY); - BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.VEGETAL_DECORATION, CYAN_ROSE_BUSH_PLACED_KEY); + //BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.VEGETAL_DECORATION, ROSE_FLOWER_PLACED_KEY); + //BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.VEGETAL_DECORATION, CYAN_ROSE_FLOWER_PLACED_KEY); + //BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.VEGETAL_DECORATION, CYAN_ROSE_BUSH_PLACED_KEY); //REGISTER BLOCKS AND BLOCK ITEMS //ROSE FLOWER - Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "rose_flower"), ROSE_FLOWER); - Registry.register(Registries.ITEM, new Identifier(MOD_ID, "rose_flower"), new BlockItem(ROSE_FLOWER, new QuiltItemSettings())); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID, "rose_flower"), ROSE_FLOWER); + Registry.register(Registry.ITEM, new Identifier(MOD_ID, "rose_flower"), new BlockItem(ROSE_FLOWER, new QuiltItemSettings())); //POTTED ROSE FLOWER - Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "potted_rose"), POTTED_ROSE); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID, "potted_rose"), POTTED_ROSE); //CYAN ROSE - Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "cyan_rose"), CYAN_ROSE); - Registry.register(Registries.ITEM, new Identifier(MOD_ID, "cyan_rose"), new BlockItem(CYAN_ROSE, new QuiltItemSettings())); + //Registry.register(Registry.BLOCK, new Identifier(MOD_ID, "cyan_rose"), CYAN_ROSE); + Registry.register(Registry.ITEM, new Identifier(MOD_ID, "cyan_rose"), new BlockItem(CYAN_ROSE, new QuiltItemSettings())); //POTTED CYAN ROSE - Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "potted_cyan"), POTTED_CYAN); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID, "potted_cyan"), POTTED_CYAN); //CYAN ROSE BUSH - Registry.register(Registries.BLOCK, new Identifier(MOD_ID, "cyan_rose_bush"), CYAN_ROSE_BUSH); - Registry.register(Registries.ITEM, new Identifier(MOD_ID, "cyan_rose_bush"), new BlockItem(CYAN_ROSE_BUSH, new QuiltItemSettings())); + Registry.register(Registry.BLOCK, new Identifier(MOD_ID, "cyan_rose_bush"), CYAN_ROSE_BUSH); + Registry.register(Registry.ITEM, new Identifier(MOD_ID, "cyan_rose_bush"), new BlockItem(CYAN_ROSE_BUSH, new QuiltItemSettings())); //CREATIVE TABS - ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> content.addAfter(Items.POPPY, ROSE_FLOWER)); - ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> content.addAfter(Items.BLUE_ORCHID, CYAN_ROSE)); - ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> content.addAfter(Items.ROSE_BUSH, CYAN_ROSE_BUSH)); + //ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> content.addAfter(Items.POPPY, ROSE_FLOWER)); + //ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> content.addAfter(Items.BLUE_ORCHID, CYAN_ROSE)); + //ItemGroupEvents.modifyEntriesEvent(ItemGroups.NATURAL_BLOCKS).register(content -> content.addAfter(Items.ROSE_BUSH, CYAN_ROSE_BUSH)); //LOOT TABLES @@ -83,8 +80,6 @@ public class RosesMod implements ModInitializer { } }); - - //INIT LOGGER.info("Let that prickly nostalgia in."); } diff --git a/src/main/java/xyz/limepot/roses_mod/world/gen/ModFlowerGeneration.java b/src/main/java/xyz/limepot/roses_mod/world/gen/ModFlowerGeneration.java index cd857c4..302f70a 100644 --- a/src/main/java/xyz/limepot/roses_mod/world/gen/ModFlowerGeneration.java +++ b/src/main/java/xyz/limepot/roses_mod/world/gen/ModFlowerGeneration.java @@ -1,16 +1,14 @@ package xyz.limepot.roses_mod.world.gen; -import net.minecraft.registry.RegistryKey; -import net.minecraft.registry.RegistryKeys; import net.minecraft.util.Identifier; import net.minecraft.world.gen.feature.PlacedFeature; import xyz.limepot.roses_mod.RosesMod; public class ModFlowerGeneration { - public static final RegistryKey ROSE_FLOWER_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","rose_flower")); - public static final RegistryKey CYAN_ROSE_FLOWER_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","cyan_rose_flower")); - public static final RegistryKey CYAN_ROSE_BUSH_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","cyan_rose_bush")); + //public static final RegistryKey ROSE_FLOWER_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","rose_flower")); + //public static final RegistryKey CYAN_ROSE_FLOWER_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","cyan_rose_flower")); + //public static final RegistryKey CYAN_ROSE_BUSH_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("roses_mod","cyan_rose_bush")); public static void generateFlowers() { RosesMod.LOGGER.debug("Registering Features..."); diff --git a/src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose_flower.json b/src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose.json similarity index 77% rename from src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose_flower.json rename to src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose.json index b404ef9..308ea91 100644 --- a/src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose_flower.json +++ b/src/main/resources/data/roses_mod/loot_tables/blocks/cyan_rose.json @@ -6,7 +6,7 @@ "entries": [ { "type": "minecraft:item", - "name": "roses_mod:cyan_rose_flower" + "name": "roses_mod:cyan_rose" } ] } diff --git a/src/main/resources/quilt.mod.json b/src/main/resources/quilt.mod.json index e1271d6..b934553 100644 --- a/src/main/resources/quilt.mod.json +++ b/src/main/resources/quilt.mod.json @@ -26,15 +26,15 @@ "depends": [ { "id": "quilt_loader", - "versions": ">=0.19.1" + "versions": ">=0.17.0" }, { "id": "quilted_fabric_api", - "versions": ">=7.0.3" + "versions": ">=1.0.0-beta.28+0.67.0-1.18.2" }, { "id": "minecraft", - "versions": ">=1.20-" + "versions": ">=1.18.2" } ] },