20 lines
1.2 KiB
Diff
20 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MrHua269 <novau233@163.com>
|
|
Date: Sun, 28 Jan 2024 09:31:27 +0000
|
|
Subject: [PATCH] Gale Don't trigger lootable refresh for non-player
|
|
interaction
|
|
|
|
|
|
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 fa64bf5ad13c278438039b663ea3134e72108411..cb3318c124337868f763b0e060f90e7eb3ba466d 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();
|