<?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%2FBlock</id>
	<title>BKCommonLib/Block - 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%2FBlock"/>
	<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Block&amp;action=history"/>
	<updated>2026-04-05T12:32:51Z</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/Block&amp;diff=7819&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/Block&amp;diff=7819&amp;oldid=prev"/>
		<updated>2025-10-12T09:44:44Z</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;BlockUtil contains various handy Block-related utilities. It offers:&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;BlockUtil contains various handy Block-related utilities. It offers:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

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

		<summary type="html">&lt;p&gt;Andre601 moved page &lt;a href=&quot;/index.php?title=BkCommonLib/Block&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;BkCommonLib/Block (page does not exist)&quot;&gt;BkCommonLib/Block&lt;/a&gt; to &lt;a href=&quot;/p/BKCommonLib/Block&quot; title=&quot;BKCommonLib/Block&quot;&gt;BKCommonLib/Block&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-96:rev-1556 --&gt;
&lt;/table&gt;</summary>
		<author><name>Andre601</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/Block&amp;diff=96&amp;oldid=prev</id>
		<title>RyanDo: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Block&amp;diff=96&amp;oldid=prev"/>
		<updated>2020-11-17T21:36:09Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&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 21:36, 17 November 2020&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-95:rev-96 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/Block&amp;diff=95&amp;oldid=prev</id>
		<title>Bergerhealer Wiki&gt;Andre601: /* Block State */</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/Block&amp;diff=95&amp;oldid=prev"/>
		<updated>2020-09-27T16:47:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Block State&lt;/span&gt;&lt;/span&gt;&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;
BlockUtil contains various handy Block-related utilities. It offers:&lt;br /&gt;
&lt;br /&gt;
* get Block State cast to a certain type (null on failure)&lt;br /&gt;
* get Block Data cast to a certain type (null on failure)&lt;br /&gt;
* Shortcuts for get/setFacing&lt;br /&gt;
* get Block attached face or Block&lt;br /&gt;
* Toggling all levers attached to a block&lt;br /&gt;
* get all Block States in a cuboid area&lt;br /&gt;
See also: MaterialUtil for block type equality checks. It contains various material properties, for example, to check whether a material is a type of rails or sign, or whether a block is a power source. It can save some time implementing your own systems if used right.&lt;br /&gt;
&lt;br /&gt;
==Block State==&lt;br /&gt;
Unlike block.getState(), this version won&amp;#039;t throw random NPE&amp;#039;s when the tile entity is glitched. There is also an overload to cast to a certain type of state, for example, a chest. This can be useful to reduce the amount of code needed to get a chest state. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Chest chest = BlockUtil.getState(block, Chest.class);&lt;br /&gt;
if (chest != null) {&lt;br /&gt;
    // Work with it&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Block Material Data==&lt;br /&gt;
Optimized version of Block.getState().getData() - creates Material Data without first creating a (useless) BlockState instance. It also includes several safety checks to avoid malformed data resulting in unusable MaterialData classes. Glitched signs are fixed right up! Usage is very similar to the getState methods.&lt;br /&gt;
&lt;br /&gt;
==Getting block states in an area==&lt;br /&gt;
This optimized method allows obtaining all nearby chests, signs, furnaces and other tile entities that have specific Block States. This way you can heavily optimize your previous for-loop check. Note that this method is not cross-thread safe - only use it on the main thread.&lt;/div&gt;</summary>
		<author><name>Bergerhealer Wiki&gt;Andre601</name></author>
	</entry>
</feed>