From 1ee24b409f2d0f9827359f288dfe118d9c1d10a2 Mon Sep 17 00:00:00 2001 From: Derpy Date: Fri, 5 May 2023 13:25:47 -0400 Subject: [PATCH 1/3] add 1.20 snapshot support --- gradle.properties | 6 +++--- src/main/java/daniking/birdsnests/BirdsNests.java | 10 +++++++++- src/main/java/daniking/birdsnests/NestItem.java | 2 +- src/main/resources/fabric.mod.json | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gradle.properties b/gradle.properties index 0f61097..fd4109b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.19.4 -yarn_mappings=1.19.4+build.2 +minecraft_version=23w18a +yarn_mappings=23w18a+build.4 loader_version=0.14.19 # Mod Properties mod_version = 1.0.1 maven_group = daniking archives_base_name = birdsnests # Dependencies -fabric_version=0.78.0+1.19.4 +fabric_version=0.80.1+1.20 cloth_config_version=7.0.72 \ No newline at end of file diff --git a/src/main/java/daniking/birdsnests/BirdsNests.java b/src/main/java/daniking/birdsnests/BirdsNests.java index 2ab1643..f525454 100644 --- a/src/main/java/daniking/birdsnests/BirdsNests.java +++ b/src/main/java/daniking/birdsnests/BirdsNests.java @@ -24,7 +24,15 @@ public class BirdsNests implements ModInitializer { public static final String MODID = "birdsnests"; public static final Logger LOGGER = LoggerFactory.getLogger(BirdsNests.class); - private static final List LOOT_TABLE_IDENTIFIERS = ImmutableList.of(Blocks.OAK_LEAVES.getLootTableId(), Blocks.SPRUCE_LEAVES.getLootTableId(), Blocks.BIRCH_LEAVES.getLootTableId(), Blocks.JUNGLE_LEAVES.getLootTableId(), Blocks.ACACIA_LEAVES.getLootTableId(), Blocks.DARK_OAK_LEAVES.getLootTableId()); + private static final List LOOT_TABLE_IDENTIFIERS = ImmutableList.of( + Blocks.OAK_LEAVES.getLootTableId(), + Blocks.SPRUCE_LEAVES.getLootTableId(), + Blocks.BIRCH_LEAVES.getLootTableId(), + Blocks.JUNGLE_LEAVES.getLootTableId(), + Blocks.ACACIA_LEAVES.getLootTableId(), + Blocks.DARK_OAK_LEAVES.getLootTableId(), + Blocks.CHERRY_LEAVES.getLootTableId() + ); public static ConfigFile configFile; public static Item nest; diff --git a/src/main/java/daniking/birdsnests/NestItem.java b/src/main/java/daniking/birdsnests/NestItem.java index acaadee..8312c93 100644 --- a/src/main/java/daniking/birdsnests/NestItem.java +++ b/src/main/java/daniking/birdsnests/NestItem.java @@ -41,7 +41,7 @@ public TypedActionResult use(World world, PlayerEntity user, Hand han } private static void spawnLoot(ServerWorld world, PlayerEntity player) { - final LootTable table = world.getServer().getLootManager().getTable(new Identifier(BirdsNests.MODID, "nest/nest_loot")); + final LootTable table = world.getServer().getLootManager().getLootTable(new Identifier(BirdsNests.MODID, "nest/nest_loot")); final List loot = table.generateLoot(new LootContext.Builder(world).build(LootContextType.create().build())); if (!loot.isEmpty()) { final Random random = player.getRandom(); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index f8b9a11..1d92f32 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -27,7 +27,7 @@ "depends": { "fabricloader": ">=0.13.3", "fabric": "*", - "minecraft": "1.19.x", + "minecraft": "1.20-alpha.23.18.a", "java": ">=17", "cloth-config2": ">=6.2.57" } From bc2c63bfa56dbbad54239c0b655b188f8569166e Mon Sep 17 00:00:00 2001 From: Derpy Date: Fri, 19 May 2023 21:25:46 -0400 Subject: [PATCH 2/3] Update to 1.20 --- gradle.properties | 9 +++++---- src/main/java/daniking/birdsnests/NestItem.java | 4 ++-- src/main/resources/fabric.mod.json | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index fd4109b..c31a05e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,13 +2,14 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=23w18a -yarn_mappings=23w18a+build.4 +minecraft_version=1.20-pre4 +yarn_mappings=1.20-pre4+build.2 loader_version=0.14.19 +#Fabric api # Mod Properties -mod_version = 1.0.1 +mod_version = 1.0.2 maven_group = daniking archives_base_name = birdsnests # Dependencies -fabric_version=0.80.1+1.20 +fabric_version=0.81.2+1.20 cloth_config_version=7.0.72 \ No newline at end of file diff --git a/src/main/java/daniking/birdsnests/NestItem.java b/src/main/java/daniking/birdsnests/NestItem.java index 8312c93..4671578 100644 --- a/src/main/java/daniking/birdsnests/NestItem.java +++ b/src/main/java/daniking/birdsnests/NestItem.java @@ -5,7 +5,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.loot.LootTable; -import net.minecraft.loot.context.LootContext; +import net.minecraft.loot.context.LootContextParameterSet; import net.minecraft.loot.context.LootContextType; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundCategory; @@ -42,7 +42,7 @@ public TypedActionResult use(World world, PlayerEntity user, Hand han private static void spawnLoot(ServerWorld world, PlayerEntity player) { final LootTable table = world.getServer().getLootManager().getLootTable(new Identifier(BirdsNests.MODID, "nest/nest_loot")); - final List loot = table.generateLoot(new LootContext.Builder(world).build(LootContextType.create().build())); + final List loot = table.generateLoot(new LootContextParameterSet.Builder(world).build(LootContextType.create().build())); if (!loot.isEmpty()) { final Random random = player.getRandom(); for (final ItemStack entry : loot) { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 1d92f32..473d189 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -27,7 +27,7 @@ "depends": { "fabricloader": ">=0.13.3", "fabric": "*", - "minecraft": "1.20-alpha.23.18.a", + "minecraft": ">=1.20-", "java": ">=17", "cloth-config2": ">=6.2.57" } From 1fd3d1150119e5125dcbe6ed822a99a4fa07f9ea Mon Sep 17 00:00:00 2001 From: Derpy Date: Thu, 10 Aug 2023 13:39:44 -0400 Subject: [PATCH 3/3] update mappings to 1.20.1 --- gradle.properties | 9 ++++----- src/main/resources/fabric.mod.json | 3 --- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index c31a05e..327dba3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,14 +2,13 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20-pre4 -yarn_mappings=1.20-pre4+build.2 -loader_version=0.14.19 -#Fabric api +minecraft_version=1.20.1 +yarn_mappings=1.20.1+build.10 +loader_version=0.14.22 # Mod Properties mod_version = 1.0.2 maven_group = daniking archives_base_name = birdsnests # Dependencies -fabric_version=0.81.2+1.20 +fabric_version=0.86.1+1.20.1 cloth_config_version=7.0.72 \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 473d189..5d7afd2 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -8,9 +8,6 @@ "authors": [ "Daniking" ], - "contributors": [ - "DerpDerpling" - ], "contact": { "homepage": "https://www.curseforge.com/members/danik1ngrd/projects", "sources": "https://github.com/DanikingRD/BirdsNests"