mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-23 08:49:28 +00:00
27 lines
1.5 KiB
Diff
27 lines
1.5 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/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
|
index 1de09539877d40b7bdcdc8a10d1d30c81420aa5b..57be35f6a3954aec8b3b039c1d7bb02f8359cf5b 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
|
@@ -68,6 +68,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
|
|
|
@Override
|
|
public void unpackLootTable(@org.jetbrains.annotations.Nullable final Player player) {
|
|
+ if (player == null) return; // Gale - EMC - don't trigger lootable refresh for non-player interaction
|
|
// Copied from super with changes, always check the original method
|
|
net.minecraft.world.level.Level level = this.getLevel();
|
|
BlockPos blockPos = this.getBlockPos();
|