Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 9 additions & 1 deletion src/main/java/daniking/birdsnests/BirdsNests.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Identifier> 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<Identifier> 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;

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/daniking/birdsnests/NestItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -41,8 +41,8 @@ public TypedActionResult<ItemStack> 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<ItemStack> 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<ItemStack> loot = table.generateLoot(new LootContextParameterSet.Builder(world).build(LootContextType.create().build()));
if (!loot.isEmpty()) {
final Random random = player.getRandom();
for (final ItemStack entry : loot) {
Expand Down
5 changes: 1 addition & 4 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"authors": [
"Daniking"
],
"contributors": [
"DerpDerpling"
],
"contact": {
"homepage": "https://www.curseforge.com/members/danik1ngrd/projects",
"sources": "https://github.com/DanikingRD/BirdsNests"
Expand All @@ -27,7 +24,7 @@
"depends": {
"fabricloader": ">=0.13.3",
"fabric": "*",
"minecraft": "1.19.x",
"minecraft": ">=1.20-",
"java": ">=17",
"cloth-config2": ">=6.2.57"
}
Expand Down