mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-19 14:59:29 +00:00
27 lines
1.3 KiB
Diff
27 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
Date: Thu, 24 Nov 2022 22:07:56 +0100
|
|
Subject: [PATCH] Don't trigger lootable refresh for non-player interaction
|
|
|
|
License: MIT (https://opensource.org/licenses/MIT)
|
|
Gale - https://galemc.org
|
|
|
|
This patch is based on the following patch:
|
|
"Don't trigger Lootable Refresh for non player interaction"
|
|
By: Aikar <aikar@aikar.co>
|
|
As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/RandomizableContainer.java b/src/main/java/net/minecraft/world/RandomizableContainer.java
|
|
index a9a80f8bc4a6f250fe3c20482c395058f024fabd..fb60f2a86ff387f46995b6aa71b65e1b56527623 100644
|
|
--- a/src/main/java/net/minecraft/world/RandomizableContainer.java
|
|
+++ b/src/main/java/net/minecraft/world/RandomizableContainer.java
|
|
@@ -81,6 +81,7 @@ public interface RandomizableContainer extends Container {
|
|
}
|
|
|
|
default void unpackLootTable(@Nullable Player player) {
|
|
+ if (player == null) return; // Gale - EMC - don't trigger lootable refresh for non-player interaction
|
|
Level level = this.getLevel();
|
|
BlockPos blockPos = this.getBlockPos();
|
|
ResourceKey<LootTable> resourceKey = this.getLootTable();
|