You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!incoming.hasLevel() || incominginstanceofILootBlockEntity) {
28
+
if (incominginstanceofILootBlockEntity) {
25
29
return;
26
30
}
27
31
28
32
Levellevel = incoming.getLevel();
29
33
30
34
if (level == null) {
31
-
return; // This should be false because `hasLevel`
35
+
// This is over-protective because most instances of `setLootTable` are in structure post-processing which means the block entity should have already been promoted. In testing, specifically with `/lootr chest`, the block entity's level is already set by the time `setLootTable` is called so this is overprotective.
// We're probably on the client side so do nothing
39
+
return;
40
+
}
41
+
42
+
// Otherwise, try to guess that we're on the overworld. This isn't ideal but I assume the majority of the time, this will be the overworld.
43
+
level = server.overworld();
44
+
LootrAPI.LOG.error("Block entity at {} had its loot table set before its level was set. It's not possible to determine its dimension, so presuming the overworld.", incoming.getBlockPos());
0 commit comments