use of net.minecraft.stats.ServerRecipeBook in project Denizen-For-Bukkit by DenizenScript.
the class EntityHelperImpl method getDiscoveredRecipes.
public List<String> getDiscoveredRecipes(Player player) {
try {
ServerRecipeBook book = ((CraftPlayer) player).getHandle().getRecipeBook();
Set<ResourceLocation> set = (Set<ResourceLocation>) RECIPE_BOOK_DISCOVERED_SET.get(book);
List<String> output = new ArrayList<>();
for (ResourceLocation key : set) {
output.add(key.toString());
}
return output;
} catch (Throwable ex) {
Debug.echoError(ex);
}
return null;
}
Aggregations