diff --git a/gradle.properties b/gradle.properties index 0f61097..327dba3 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 -loader_version=0.14.19 +minecraft_version=1.20.1 +yarn_mappings=1.20.1+build.10 +loader_version=0.14.22 # Mod Properties -mod_version = 1.0.1 +mod_version = 1.0.2 maven_group = daniking archives_base_name = birdsnests # Dependencies -fabric_version=0.78.0+1.19.4 +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/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..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; @@ -41,8 +41,8 @@ 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 List loot = table.generateLoot(new LootContext.Builder(world).build(LootContextType.create().build())); + final LootTable table = world.getServer().getLootManager().getLootTable(new Identifier(BirdsNests.MODID, "nest/nest_loot")); + 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 f8b9a11..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" @@ -27,7 +24,7 @@ "depends": { "fabricloader": ">=0.13.3", "fabric": "*", - "minecraft": "1.19.x", + "minecraft": ">=1.20-", "java": ">=17", "cloth-config2": ">=6.2.57" }