mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
de45308069
Fixed by 23w44a/1.20.3
20 lines
1.4 KiB
Diff
20 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Tue, 7 Nov 2023 18:59:04 -0800
|
|
Subject: [PATCH] Don't unpack loot table for TEs not in world
|
|
|
|
Fixed by 23w44a/1.20.3. Remove it then
|
|
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
|
@@ -0,0 +0,0 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
|
}
|
|
|
|
public void unpackLootTable(@Nullable Player player) {
|
|
- if (this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper
|
|
+ if (this.level != null && this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper - don't unpack loot table if not in world
|
|
LootTable lootTable = this.level.getServer().getLootData().getLootTable(this.lootTable);
|
|
if (player instanceof ServerPlayer) {
|
|
CriteriaTriggers.GENERATE_LOOT.trigger((ServerPlayer)player, this.lootTable);
|