<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.traincarts.net/index.php?action=history&amp;feed=atom&amp;title=BKCommonLib%2FRecipes</id>
	<title>BKCommonLib/Recipes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.traincarts.net/index.php?action=history&amp;feed=atom&amp;title=BKCommonLib%2FRecipes"/>
	<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Recipes&amp;action=history"/>
	<updated>2026-05-01T00:16:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.13</generator>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/Recipes&amp;diff=7788&amp;oldid=prev</id>
		<title>RyanDo at 09:43, 12 October 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Recipes&amp;diff=7788&amp;oldid=prev"/>
		<updated>2025-10-12T09:43:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:43, 12 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[BKCommonLib|« Go back]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Introduction==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/RecipeUtil.java RecipeUtil] provides various utility methods to work with item crafting and furnace recipes. It allows you to obtain the information required to do various recipe-related operations.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/RecipeUtil.java RecipeUtil] provides various utility methods to work with item crafting and furnace recipes. It allows you to obtain the information required to do various recipe-related operations.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-1548:rev-7788 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/Recipes&amp;diff=1548&amp;oldid=prev</id>
		<title>RyanDo: Created page with &quot;« Go back  ==Introduction== [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/RecipeUtil.java Recipe...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Recipes&amp;diff=1548&amp;oldid=prev"/>
		<updated>2021-06-09T19:14:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/p/BKCommonLib&quot; title=&quot;BKCommonLib&quot;&gt;« Go back&lt;/a&gt;  ==Introduction== [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/RecipeUtil.java Recipe...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[BKCommonLib|« Go back]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/RecipeUtil.java RecipeUtil] provides various utility methods to work with item crafting and furnace recipes. It allows you to obtain the information required to do various recipe-related operations.&lt;br /&gt;
&lt;br /&gt;
==Craft Recipes==&lt;br /&gt;
To perform crafting operations, BKCommonLib has it&amp;#039;s own implementation, or wrapper class, to store and use a crafting (table) recipe: [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/inventory/CraftRecipe.java CraftRecipe]. In this class, all required input items and resulting output item(s) are stored. You can then, by calling just one method, perform the crafting in an inventory, with an optional maximum amount of times.&lt;br /&gt;
&lt;br /&gt;
==Obtaining a Craft Recipe==&lt;br /&gt;
There are methods in [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/RecipeUtil.java RecipeUtil] to obtain the Craft Recipes that are able to produce a given item, this method is called &amp;#039;&amp;#039;&amp;#039;getCraftingRequirements&amp;#039;&amp;#039;&amp;#039;. As a plugin, you can then go through all recipes and try to craft something, or design your own filter to get the desired results.&lt;br /&gt;
&lt;br /&gt;
==Example of Craft Recipes being used==&lt;br /&gt;
The following example will try to craft 64 wood &amp;#039;pieces&amp;#039; (one item with amount 64) using the items from a player inventory. Note that &amp;#039;&amp;#039;&amp;#039;craft&amp;#039;&amp;#039;&amp;#039; does not take in account how many items you get per crafting operation, therefore &amp;#039;&amp;#039;&amp;#039;craftItems&amp;#039;&amp;#039;&amp;#039; was added that takes care of that. It only uses the first recipe that can be found in this example, so other ways to craft wood are ignored.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Inventory inventory = player.getInventory();&lt;br /&gt;
CraftRecipe[] recipes = RecipeUtil.getCraftingRequirements(Material.WOOD, null);&lt;br /&gt;
if (recipes.length &amp;gt; 0) {&lt;br /&gt;
    recipes[0].craftItems(inventory, 64);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to be certain that crafting is possible, make a copy of the inventory (e.g. InventoryBaseImpl) and pass that into the crafting method first.&lt;br /&gt;
&lt;br /&gt;
==Furnace &amp;#039;recipes&amp;#039;==&lt;br /&gt;
The furnace does not really maintain a list of recipes, instead it more or less assigns a property to certain items that make them &amp;#039;furnace craftable&amp;#039;. For that reason, and because the output amount is always 1, no special FurnaceCraftRecipe is added. Instead, you can obtain the furnace results, check the fuel time of items, check whether an item is fuel and whether an item can be heated, and so on. All of these methods can be found in [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/RecipeUtil.java RecipeUtil].&lt;/div&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
</feed>