diff --git a/build.gradle b/build.gradle index 3291d17..2a5ed85 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "1.4-SNAPSHOT" apply false - id "me.modmuss50.mod-publish-plugin" version "0.4.5" + id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false + id "me.modmuss50.mod-publish-plugin" version "0.5.1" } ext.isSnapshot = providers.environmentVariable("SNAPSHOT").map { it == "true" }.getOrElse(false) @@ -39,7 +39,7 @@ allprojects { tasks.withType(JavaCompile) { options.encoding = "UTF-8" - options.release = 17 + options.release = 21 } java { diff --git a/common/src/main/java/dev/wuffs/BambooEverythingClient.java b/common/src/main/java/dev/wuffs/BambooEverythingClient.java index 8d1e745..0a97654 100644 --- a/common/src/main/java/dev/wuffs/BambooEverythingClient.java +++ b/common/src/main/java/dev/wuffs/BambooEverythingClient.java @@ -9,7 +9,7 @@ public class BambooEverythingClient { - public static final ModelLayerLocation RAFT = new ModelLayerLocation(new ResourceLocation(BambooEverything.MOD_ID, "bamboo_raft"), "bamboo_raft"); + public static final ModelLayerLocation RAFT = new ModelLayerLocation(ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_raft"), "bamboo_raft"); public static void init(){ } diff --git a/fabric/src/main/java/dev/wuffs/fabric/RecipeGenerator.java b/fabric/src/main/java/dev/wuffs/fabric/RecipeGenerator.java index 5380909..67b8c84 100644 --- a/fabric/src/main/java/dev/wuffs/fabric/RecipeGenerator.java +++ b/fabric/src/main/java/dev/wuffs/fabric/RecipeGenerator.java @@ -3,25 +3,30 @@ import dev.wuffs.BambooEverything; 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.*; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.block.Blocks; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class RecipeGenerator extends FabricRecipeProvider { - public RecipeGenerator(FabricDataOutput output) { - super(output); + public RecipeGenerator(FabricDataOutput output, CompletableFuture registriesFuture) { + super(output, registriesFuture); } +// public RecipeGenerator(FabricDataOutput output) { +// super(output); +// } @Override public void buildRecipes(RecipeOutput exporter) { SimpleCookingRecipeBuilder.smelting(Ingredient.of(Items.BAMBOO), RecipeCategory.MISC, dev.wuffs.items.Items.DRY_BAMBOO.get(), 0.5f, 50) .unlockedBy("has_bamboo", has(Items.BAMBOO)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "dry_bamboo")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "dry_bamboo")); // Bamboo torch ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.TORCH.get()) @@ -30,14 +35,14 @@ public void buildRecipes(RecipeOutput exporter) { .pattern("B") .define('C', Ingredient.of(Items.COAL, Items.CHARCOAL)) .define('B', Items.BAMBOO) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_torch")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_torch")); ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DRY_TORCH.get()) .unlockedBy("has_bamboo", has(dev.wuffs.items.Items.DRY_BAMBOO.get())) .pattern("C") .pattern("B") .define('C', Ingredient.of(Items.COAL, Items.CHARCOAL)) .define('B', dev.wuffs.items.Items.DRY_BAMBOO.get()) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_dry_torch")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_dry_torch")); // Bamboo Ladder ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.LADDER.get()) @@ -46,69 +51,69 @@ public void buildRecipes(RecipeOutput exporter) { .pattern("BBB") .pattern("B B") .define('B', Items.BAMBOO) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_ladder")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_ladder")); ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DRY_LADDER.get()) .unlockedBy("has_bamboo", has(dev.wuffs.items.Items.DRY_BAMBOO.get())) .pattern("B B") .pattern("BBB") .pattern("B B") .define('B', dev.wuffs.items.Items.DRY_BAMBOO.get()) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_dry_ladder")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_dry_ladder")); // Block of bamboo SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_BLOCK), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.BUNDLE.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_BLOCK)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_block")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_block")); SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_BLOCK), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DRY_BUNDLE.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_BLOCK)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_dry_block")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_dry_block")); // Bamboo slab SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_SLAB), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.SLAB.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_SLAB)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_slab")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_slab")); SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_SLAB), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DRY_SLAB.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_SLAB)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_dry_slab")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_dry_slab")); // Bamboo stairs SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_STAIRS), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.STAIRS.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_STAIRS)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_stairs")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_stairs")); SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_STAIRS), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DRY_STAIRS.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_STAIRS)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_dry_stairs")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_dry_stairs")); // Bamboo fence SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_FENCE), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.FENCE.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_FENCE)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_fence")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_fence")); SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_FENCE), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DRY_FENCE.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_FENCE)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_dry_fence")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_dry_fence")); // Bamboo fence gate SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_FENCE_GATE), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.FENCEGATE.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_FENCE_GATE)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_fence_gate")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_fence_gate")); SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_FENCE_GATE), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DRY_FENCEGATE.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_FENCE_GATE)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_dry_fence_gate")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_dry_fence_gate")); // Bamboo door SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_DOOR), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DOOR.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_DOOR)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_door")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_door")); SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_DOOR), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DRY_DOOR.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_DOOR)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_dry_door")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_dry_door")); // Bamboo trapdoor SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_TRAPDOOR), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.TRAPDOOR.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_TRAPDOOR)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_trapdoor")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_trapdoor")); SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.BAMBOO_TRAPDOOR), RecipeCategory.BUILDING_BLOCKS, dev.wuffs.blocks.Blocks.DRY_TRAPDOOR.get()) .unlockedBy("has_bamboo", has(Blocks.BAMBOO_TRAPDOOR)) - .save(exporter, new ResourceLocation(BambooEverything.MOD_ID, "bamboo_dry_trapdoor")); + .save(exporter, ResourceLocation.fromNamespaceAndPath(BambooEverything.MOD_ID, "bamboo_dry_trapdoor")); } } diff --git a/forge/build.gradle b/forge/build.gradle deleted file mode 100644 index 9d2c56a..0000000 --- a/forge/build.gradle +++ /dev/null @@ -1,104 +0,0 @@ -plugins { - id "com.github.johnrengelman.shadow" version "8.1.1" -} - -architectury { - platformSetupLoomIde() - forge() -} - -loom { - accessWidenerPath = project(":common").loom.accessWidenerPath - - forge { - convertAccessWideners = true - extraAccessWideners.add loom.accessWidenerPath.get().asFile.name - } -} - -configurations { - common - shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. - compileClasspath.extendsFrom common - runtimeClasspath.extendsFrom common - developmentForge.extendsFrom common -} - -dependencies { - forge "net.minecraftforge:forge:${rootProject.forge_version}" - // Remove the next line if you don't want to depend on the API - modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}" - - common(project(path: ":common", configuration: "namedElements")) { transitive false } - shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false } -} - -processResources { - inputs.property "version", project.version - - filesMatching("META-INF/mods.toml") { - expand "version": project.version - } -} - -shadowJar { - exclude "fabric.mod.json" - exclude "architectury.common.json" - - configurations = [project.configurations.shadowCommon] - setArchiveClassifier("dev-shadow") -} - -remapJar { - inputFile.set shadowJar.archiveFile - dependsOn shadowJar - archiveBaseName.set "${rootProject.archives_base_name}-${project.name}" - setArchiveClassifier(null) -} - -jar { - setArchiveClassifier("dev") -} - -sourcesJar { - def commonSources = project(":common").sourcesJar - dependsOn commonSources - from commonSources.archiveFile.map { zipTree(it) } -} - -components.java { - withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { - skip() - } -} - -def ENV = System.getenv() - -sourceSets.each { - def dir = layout.buildDirectory.dir("sourcesSets/$it.name") - it.output.resourcesDir = dir - it.java.destinationDirectory = dir -} - - -publishing { - publications { - mavenForge(MavenPublication) { - artifactId = rootProject.archives_base_name + "-" + project.name - from components.java - } - } - - // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. - repositories { - if (ENV.NANITE_TOKEN) { - maven { - url "https://maven.nanite.dev/releases" - credentials { - username = "nanite" - password = "${ENV.NANITE_TOKEN}" - } - } - } - } -} \ No newline at end of file diff --git a/forge/gradle.properties b/forge/gradle.properties deleted file mode 100644 index 32f842a..0000000 --- a/forge/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -loom.platform=forge \ No newline at end of file diff --git a/forge/src/main/java/dev/wuffs/forge/BambooEverythingForge.java b/forge/src/main/java/dev/wuffs/forge/BambooEverythingForge.java deleted file mode 100644 index c466fcb..0000000 --- a/forge/src/main/java/dev/wuffs/forge/BambooEverythingForge.java +++ /dev/null @@ -1,30 +0,0 @@ -package dev.wuffs.forge; - -import dev.architectury.platform.forge.EventBuses; -import dev.architectury.utils.Env; -import dev.architectury.utils.EnvExecutor; -import dev.wuffs.BambooEverything; -import dev.wuffs.BambooEverythingClient; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; -import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; -import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; - -@Mod(BambooEverything.MOD_ID) -public class BambooEverythingForge { - public BambooEverythingForge() { - EventBuses.registerModEventBus(BambooEverything.MOD_ID, FMLJavaModLoadingContext.get().getModEventBus()); - BambooEverything.init(); - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientSetup); - FMLJavaModLoadingContext.get().getModEventBus().addListener(this::commonSetup); - EnvExecutor.runInEnv(Env.CLIENT, ()-> BambooEverythingClient::init); - } - - public void clientSetup(final FMLClientSetupEvent event) { - BambooEverythingClient.setRenderType(); - } - - public void commonSetup(final FMLCommonSetupEvent event){ - BambooEverything.fuelRegister(); - } -} \ No newline at end of file diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml deleted file mode 100644 index b20fa4e..0000000 --- a/forge/src/main/resources/META-INF/mods.toml +++ /dev/null @@ -1,35 +0,0 @@ -modLoader = "javafml" -loaderVersion = "[49,)" -#issueTrackerURL = "" -license = "All rights reserved" - -[[mods]] -modId = "bambooeverything" -version = "${version}" -displayName = "Bamboo Everything" -authors = "Gaz(Gaz492)" -description = ''' -All things bamboo -''' -#logoFile = "" - -[[dependencies.bambooeverything]] -modId = "forge" -mandatory = true -versionRange = "[49,)" -ordering = "NONE" -side = "BOTH" - -[[dependencies.bambooeverything]] -modId = "minecraft" -mandatory = true -versionRange = "[1.20.4,)" -ordering = "NONE" -side = "BOTH" - -[[dependencies.bambooeverything]] -modId = "architectury" -mandatory = true -versionRange = "[11.0.10,)" -ordering = "AFTER" -side = "BOTH" \ No newline at end of file diff --git a/forge/src/main/resources/data/forge/tags/blocks/wooden.json b/forge/src/main/resources/data/forge/tags/blocks/wooden.json deleted file mode 100644 index 1c26aee..0000000 --- a/forge/src/main/resources/data/forge/tags/blocks/wooden.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "replace": false, - "values": [ - "bambooeverything:bamboo_fence", - "bambooeverything:dry_bamboo_fence" - ] -} diff --git a/forge/src/main/resources/data/forge/tags/items/wooden.json b/forge/src/main/resources/data/forge/tags/items/wooden.json deleted file mode 100644 index 1c26aee..0000000 --- a/forge/src/main/resources/data/forge/tags/items/wooden.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "replace": false, - "values": [ - "bambooeverything:bamboo_fence", - "bambooeverything:dry_bamboo_fence" - ] -} diff --git a/forge/src/main/resources/pack.mcmeta b/forge/src/main/resources/pack.mcmeta deleted file mode 100644 index 23b2492..0000000 --- a/forge/src/main/resources/pack.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pack": { - "description": "Bamboo Everything", - "pack_format": 9 - } -} diff --git a/gradle.properties b/gradle.properties index 6045ad5..331bdfa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,22 +1,20 @@ org.gradle.jvmargs=-Xmx4096M -minecraft_version=1.20.4 -enabled_platforms=fabric,forge,neoforge +minecraft_version=1.21 +enabled_platforms=fabric,neoforge archives_base_name=BambooEverything -mod_version=4.1.0 +mod_version=21.0.0 maven_group=dev.wuffs -architectury_version=11.0.10 +architectury_version=13.0.1 -fabric_loader_version=0.15.3 -fabric_api_version=0.92.1+1.20.4 - -forge_version=1.20.4-49.0.14 +fabric_loader_version=0.15.11 +fabric_api_version=0.100.1+1.21 # Neo -neo_version=20.4.80-beta -neo_gradle=[7.0.60,) +neo_version=21.0.8-beta +neo_gradle=[7.0.143,) # Publishing curseforge_id=331723 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a595206..0d18421 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/neoforge/src/main/java/dev/wuffs/forge/BambooEverythingForge.java b/neoforge/src/main/java/dev/wuffs/forge/BambooEverythingForge.java index bab27bb..4754f41 100644 --- a/neoforge/src/main/java/dev/wuffs/forge/BambooEverythingForge.java +++ b/neoforge/src/main/java/dev/wuffs/forge/BambooEverythingForge.java @@ -8,7 +8,6 @@ import net.neoforged.fml.common.Mod; import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; -import net.neoforged.fml.javafmlmod.FMLJavaModLoadingContext; @Mod(BambooEverything.MOD_ID) public class BambooEverythingForge { diff --git a/settings.gradle b/settings.gradle index 6be63f7..043ca10 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,7 +1,7 @@ pluginManagement { repositories { - maven { url "https://maven.wuffs.wtf/releases" } -// maven { url "https://maven.neomc.dev/releases" } + maven { url "https://maven.wuffs.dev/releases" } + maven { url "https://maven.neomc.dev/releases" } // maven { url "https://maven.creeperhost.net/" } maven { url "https://maven.fabricmc.net/" } maven { url "https://maven.architectury.dev/" } @@ -12,7 +12,6 @@ pluginManagement { include("common") include("fabric") -include("forge") include("neoforge") rootProject.name = "BambooEverything"