mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
--------- Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com>
20 lines
1.3 KiB
Diff
20 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Mon, 4 Sep 2023 22:09:10 +0800
|
|
Subject: [PATCH] RNG Fishing
|
|
|
|
|
|
diff --git a/net/minecraft/world/entity/projectile/FishingHook.java b/net/minecraft/world/entity/projectile/FishingHook.java
|
|
index 2c79332e148375c2f277df94b16ce7dd2422c004..a22590c8c48049733d751306a2daa5686cbcf082 100644
|
|
--- a/net/minecraft/world/entity/projectile/FishingHook.java
|
|
+++ b/net/minecraft/world/entity/projectile/FishingHook.java
|
|
@@ -534,7 +534,7 @@ public class FishingHook extends Projectile {
|
|
.withLuck(this.luck + playerOwner.getLuck())
|
|
.create(LootContextParamSets.FISHING);
|
|
LootTable lootTable = this.level().getServer().reloadableRegistries().getLootTable(BuiltInLootTables.FISHING);
|
|
- List<ItemStack> randomItems = lootTable.getRandomItems(lootParams);
|
|
+ List<ItemStack> randomItems = org.leavesmc.leaves.LeavesConfig.modify.oldMC.rngFishing ? lootTable.getRandomItems(lootParams, this.random) : lootTable.getRandomItems(lootParams); // Leaves - world random
|
|
CriteriaTriggers.FISHING_ROD_HOOKED.trigger((ServerPlayer)playerOwner, stack, this, randomItems);
|
|
|
|
for (ItemStack itemStack : randomItems) {
|