mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-27 10:59:17 +00:00
20 lines
1.6 KiB
Diff
20 lines
1.6 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/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
|
index 0e00f59a8962dd6356d483ef5be3209a3a410008..1c556f9cca2d21c3bdb49cb22263a597c6a8680f 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
|
@@ -523,7 +523,7 @@ public class FishingHook extends Projectile {
|
|
} else if (this.nibble > 0) {
|
|
LootParams lootparams = (new LootParams.Builder((ServerLevel) this.level())).withParameter(LootContextParams.ORIGIN, this.position()).withParameter(LootContextParams.TOOL, usedItem).withParameter(LootContextParams.THIS_ENTITY, this).withLuck((float) this.luck + entityhuman.getLuck()).create(LootContextParamSets.FISHING);
|
|
LootTable loottable = this.level().getServer().reloadableRegistries().getLootTable(BuiltInLootTables.FISHING);
|
|
- List<ItemStack> list = loottable.getRandomItems(lootparams);
|
|
+ List<ItemStack> list = org.leavesmc.leaves.LeavesConfig.rngFishing ? loottable.getRandomItems(lootparams, this.random) : loottable.getRandomItems(lootparams); // Leaves - world random
|
|
|
|
CriteriaTriggers.FISHING_ROD_HOOKED.trigger((ServerPlayer) entityhuman, usedItem, this, list);
|
|
Iterator iterator = list.iterator();
|