<?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%2FIIIT</id>
	<title>BKCommonLib/IIIT - 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%2FIIIT"/>
	<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/IIIT&amp;action=history"/>
	<updated>2026-05-09T11:24:11Z</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/IIIT&amp;diff=7826&amp;oldid=prev</id>
		<title>RyanDo at 09:44, 12 October 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/IIIT&amp;diff=7826&amp;oldid=prev"/>
		<updated>2025-10-12T09:44:56Z</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:44, 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;This page covers the item to item, inventory to item, item to inventory and inventory to inventory transfer principles. It covers how item(s) go from one place to another, and the methods available to achieve this. It also covers several other item utilities, new base classes you can use and use cases.&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;This page covers the item to item, inventory to item, item to inventory and inventory to inventory transfer principles. It covers how item(s) go from one place to another, and the methods available to achieve this. It also covers several other item utilities, new base classes you can use and use cases.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-1558:rev-7826 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/IIIT&amp;diff=1558&amp;oldid=prev</id>
		<title>Andre601: Andre601 moved page BkCommonLib/IIIT to BKCommonLib/IIIT</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/IIIT&amp;diff=1558&amp;oldid=prev"/>
		<updated>2021-06-09T22:22:20Z</updated>

		<summary type="html">&lt;p&gt;Andre601 moved page &lt;a href=&quot;/index.php?title=BkCommonLib/IIIT&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;BkCommonLib/IIIT (page does not exist)&quot;&gt;BkCommonLib/IIIT&lt;/a&gt; to &lt;a href=&quot;/p/BKCommonLib/IIIT&quot; title=&quot;BKCommonLib/IIIT&quot;&gt;BKCommonLib/IIIT&lt;/a&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 22:22, 9 June 2021&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-1547:rev-1558 --&gt;
&lt;/table&gt;</summary>
		<author><name>Andre601</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/IIIT&amp;diff=1547&amp;oldid=prev</id>
		<title>RyanDo: Created page with &quot;« Go back  ==Introduction== This page covers the item to item, inventory to item, item to inventory and inventory to inventory transfer principles. It covers...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/IIIT&amp;diff=1547&amp;oldid=prev"/>
		<updated>2021-06-09T19:11:32Z</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== This page covers the item to item, inventory to item, item to inventory and inventory to inventory transfer principles. It covers...&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;
This page covers the item to item, inventory to item, item to inventory and inventory to inventory transfer principles. It covers how item(s) go from one place to another, and the methods available to achieve this. It also covers several other item utilities, new base classes you can use and use cases.&lt;br /&gt;
&lt;br /&gt;
==ItemParser==&lt;br /&gt;
An ItemParser is used to define the rules for a transfer operation. It can be created from user input using a certain format, but can also be created in-code. An item parser has the following &amp;#039;fields&amp;#039;:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Has amount&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;amount&amp;#039;&amp;#039;&amp;#039;: the maximum amount of items that is allowed to be transferred, and whether this is used&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Has type&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;type&amp;#039;&amp;#039;&amp;#039;: the item type to be transferred, and whether an item type restriction is there&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Has data&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;data&amp;#039;&amp;#039;&amp;#039;: the item data to be transferred, and whether an item data restriction is there All these settings will be used when transferring items.&lt;br /&gt;
&lt;br /&gt;
==Parsed format==&lt;br /&gt;
There are rules defined to create an item parser from user input, these are:&lt;br /&gt;
&lt;br /&gt;
* The : sign delimits type and data&lt;br /&gt;
* The &amp;#039;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;X&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;*&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;&amp;lt;space&amp;gt;&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;&amp;lt;comma&amp;gt;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;@&amp;#039;&amp;#039;&amp;#039; signs are used to delimit data/type and the amount&lt;br /&gt;
* Type can be the material ID, or the material name, or part of a material name (it uses ParseUtil.parseMaterial)&lt;br /&gt;
* Data can be a value from 0 to 15, or an identifier of data for the type (e.g. wood, stone, etc.)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ &amp;#039;&amp;#039;&amp;#039;Examples&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
! Format !! Result&lt;br /&gt;
|-&lt;br /&gt;
| 5xwood || 5 pieces of wood&lt;br /&gt;
|-&lt;br /&gt;
| 12@ironore || 12 pieces of iron ore&lt;br /&gt;
|-&lt;br /&gt;
| 5xwool:red || 5 pieces of red wool&lt;br /&gt;
|-&lt;br /&gt;
| 6xcoal:1 || 6 pieces of charcoal&lt;br /&gt;
|-&lt;br /&gt;
| 22xlog:birch || 22 pieces of birch logs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Transfer and Item Utilities==&lt;br /&gt;
All utilities can be found in [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/ItemUtil.java ItemUtil]. All methods called &amp;#039;transfer&amp;#039; transfer items from one place to another. There are also methods to check whether a full transfer is possible at all, allowing you to check it before having a failing result.&lt;br /&gt;
&lt;br /&gt;
This class also contains several other item-related utilities, such as those to clone items, clone inventory contents, transfer item metadata, constructing an empty item which has a handle, and much more. Whenever you run into something that has to do with items, check whether there is a method in ItemUtil that could make your life easier.&lt;br /&gt;
&lt;br /&gt;
==Inventories==&lt;br /&gt;
There are also several base classes you can use. All of them extend CraftInventory (or another type used by the implementation), so it is required to compile against CraftBukkit to get around &amp;#039;class hierarchy&amp;#039; errors. They pose no real threat in this case. The base classes are:&lt;br /&gt;
* [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/inventory/InventoryBase.java InventoryBase] - a base class that has everything implemented except the getting and setting of items&lt;br /&gt;
* [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/inventory/InventoryBaseImpl.java InventoryBaseImp] - base implementation backed by an array of ItemStack&lt;br /&gt;
* [https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/inventory/MergedInventory.java MergedInventory] - an inventory of inventories, merging multiple together as one&lt;br /&gt;
If you need a quick and dirty way to implement your own Inventory type, these base classes make this a lot easier. Since the base class extends CraftBukkit&amp;#039;s inventory, you are automatically provided with the latest methods Bukkit has to offer.&lt;/div&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
</feed>