Oops didn't compile

This commit is contained in:
jglrxavpok 2020-07-07 18:44:55 +02:00
parent 6b1da01795
commit 109afe7a54

View File

@ -1,11 +1,14 @@
package net.minestom.server.gamedata.loottables.entries;
import net.minestom.server.MinecraftServer;
import net.minestom.server.gamedata.Condition;
import net.minestom.server.gamedata.loottables.LootTable;
import net.minestom.server.gamedata.loottables.LootTableEntryType;
import net.minestom.server.gamedata.loottables.LootTableFunction;
import net.minestom.server.gamedata.loottables.LootTableManager;
import net.minestom.server.utils.NamespaceID;
import java.io.FileNotFoundException;
import java.util.List;
/**
@ -14,6 +17,11 @@ import java.util.List;
public class TagType implements LootTableEntryType {
@Override
public LootTable.Entry create(LootTableManager lootTableManager, String name, List<Condition> conditions, List<LootTable.Entry> children, boolean expand, List<LootTableFunction> functions, int weight, int quality) {
return new TagEntry(this, name, expand, weight, quality, conditions);
try {
return new TagEntry(this, MinecraftServer.getTagManager().load(NamespaceID.from(name), "items"), expand, weight, quality, conditions);
} catch (FileNotFoundException e) {
e.printStackTrace();
return null;
}
}
}