Skip to content

Commit

Permalink
1.21 port
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaz492 committed Jun 15, 2024
1 parent 735fd77 commit 75336bf
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 230 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -39,7 +39,7 @@ allprojects {

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
options.release = 21
}

java {
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/dev/wuffs/BambooEverythingClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
}

Expand Down
47 changes: 26 additions & 21 deletions fabric/src/main/java/dev/wuffs/fabric/RecipeGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<HolderLookup.Provider> 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())
Expand All @@ -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())
Expand All @@ -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"));
}
}
104 changes: 0 additions & 104 deletions forge/build.gradle

This file was deleted.

1 change: 0 additions & 1 deletion forge/gradle.properties

This file was deleted.

30 changes: 0 additions & 30 deletions forge/src/main/java/dev/wuffs/forge/BambooEverythingForge.java

This file was deleted.

35 changes: 0 additions & 35 deletions forge/src/main/resources/META-INF/mods.toml

This file was deleted.

7 changes: 0 additions & 7 deletions forge/src/main/resources/data/forge/tags/blocks/wooden.json

This file was deleted.

7 changes: 0 additions & 7 deletions forge/src/main/resources/data/forge/tags/items/wooden.json

This file was deleted.

6 changes: 0 additions & 6 deletions forge/src/main/resources/pack.mcmeta

This file was deleted.

18 changes: 8 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading

0 comments on commit 75336bf

Please sign in to comment.