Skip to content

Commit 42e9fec

Browse files
committed
Provide an EmptyLootFiller for people who might need it. (Clavis)
1 parent 256f89e commit 42e9fec

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package noobanidus.mods.lootr.common.api.data;
2+
3+
import net.minecraft.world.Container;
4+
import net.minecraft.world.entity.player.Player;
5+
import noobanidus.mods.lootr.common.api.LootrAPI;
6+
import org.jetbrains.annotations.NotNull;
7+
8+
public class EmptyLootFiller implements LootFiller {
9+
public static final EmptyLootFiller INSTANCE = new EmptyLootFiller();
10+
11+
@Override
12+
public void unpackLootTable(@NotNull ILootrInfoProvider provider, @NotNull Player player, Container inventory) {
13+
if (provider.isInfoReferenceInventory()) {
14+
LootrAPI.LOG.error("EmptyLootFiller was used to fill container {} with a reference inventory at {} in {}", provider.getInfoUUID(), provider.getInfoPos(), provider.getInfoDimension());
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)