<?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%2FGeneral</id>
	<title>BKCommonLib/General - 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%2FGeneral"/>
	<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/General&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/General&amp;diff=7845&amp;oldid=prev</id>
		<title>RyanDo at 09:46, 12 October 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/General&amp;diff=7845&amp;oldid=prev"/>
		<updated>2025-10-12T09:46:06Z</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:46, 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;There are various utilities that have nothing to do with Bukkit or Minecraft alone. These are utilities working with mathematics, logic, strings and blockfaces. There are a lot of utilities, and listing them all here is going to result in too much information. Instead the basic features covered are listed so you know where to find them.&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;There are various utilities that have nothing to do with Bukkit or Minecraft alone. These are utilities working with mathematics, logic, strings and blockfaces. There are a lot of utilities, and listing them all here is going to result in too much information. Instead the basic features covered are listed so you know where to find them.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key pulseco1_mediawiki:diff::1.12:old-94:rev-7845 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/General&amp;diff=94&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/General&amp;diff=94&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-93:rev-94 --&gt;
&lt;/table&gt;</summary>
		<author><name>RyanDo</name></author>
	</entry>
	<entry>
		<id>https://wiki.traincarts.net/index.php?title=BKCommonLib/General&amp;diff=93&amp;oldid=prev</id>
		<title>Bergerhealer Wiki&gt;RyanDo at 19:40, 13 September 2020</title>
		<link rel="alternate" type="text/html" href="https://wiki.traincarts.net/index.php?title=BKCommonLib/General&amp;diff=93&amp;oldid=prev"/>
		<updated>2020-09-13T19:40:14Z</updated>

		<summary type="html">&lt;p&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;
There are various utilities that have nothing to do with Bukkit or Minecraft alone. These are utilities working with mathematics, logic, strings and blockfaces. There are a lot of utilities, and listing them all here is going to result in too much information. Instead the basic features covered are listed so you know where to find them.&lt;br /&gt;
&lt;br /&gt;
==Math==&lt;br /&gt;
[https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/MathUtil.java MathUtil] contains various common operations involving math:&lt;br /&gt;
&lt;br /&gt;
* length, lengthSquared, distance, distanceSquared, normalize - both 2D and 3D vector length operations&lt;br /&gt;
* wrapAngle, getAngleDifference, toChunk, Long&amp;lt;&amp;gt;2Int, fixNaN, clamp, lerp, atan2 - for simplistic number calculations&lt;br /&gt;
* getLookAtYaw/Pitch, getDirection, isHeadingTo, move, rotate - for rotation-based vector calculations and checks&lt;br /&gt;
==BlockFace==&lt;br /&gt;
[https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/FaceUtil.java FaceUtil] contains various common operations involving the conversion from and to BlockFaces:&lt;br /&gt;
&lt;br /&gt;
* Conversion between yaw and BlockFace&lt;br /&gt;
* Conversion between vector directions and BlockFace&lt;br /&gt;
* Conversion between &amp;#039;notch&amp;#039; (0-7) and BlockFace&lt;br /&gt;
* Several BlockFace constants for easier logic&lt;br /&gt;
==Logic==&lt;br /&gt;
[https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/LogicUtil.java LogicUtil] contains methods to work with general logic such as checking for null and returning something else, logic involving collections and more:&lt;br /&gt;
&lt;br /&gt;
* Conversion between primitive and boxed class types&lt;br /&gt;
* Checking whether an Object is null or empty&lt;br /&gt;
* Checking whether an index is in bounds of an array or list&lt;br /&gt;
* Dynamically creating arrays and getting array elements&lt;br /&gt;
* Checking to see if a given value is present in a primitive type array&lt;br /&gt;
==String==&lt;br /&gt;
[https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/StringUtil.java StringUtil] contains methods to format Strings, get the first index of text in a String and other String-related operations:&lt;br /&gt;
&lt;br /&gt;
* Get the width of text in Minecraft font (might become deprecated)&lt;br /&gt;
* Get the first index of multiple pieces of text&lt;br /&gt;
* Get the text before or after a piece of text&lt;br /&gt;
* Obtain a String filled with certain text appended N times&lt;br /&gt;
* Trimming the end or start of text from whitespaces&lt;br /&gt;
* Combining multiple pieces of text together with a delimiter, or using , and and&lt;br /&gt;
* Converting &amp;quot;-surrounded parts into a single element (for command argument conversion)&lt;br /&gt;
* Get the amount of successive times a given character is present in a text&lt;br /&gt;
* Chat style conversion methods&lt;br /&gt;
* Replacing text, or all text&lt;br /&gt;
==Parsing==&lt;br /&gt;
[https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/ParseUtil.java ParseUtil] takes care of number, boolean and enum parsing. Note that the Conversion system already includes redirects to this class:&lt;br /&gt;
&lt;br /&gt;
* Parsing booleans, checking whether a piece of text can be interpreted as a boolean&lt;br /&gt;
* Parsing numbers, checking whether a piece of text can be interpreted as a number&lt;br /&gt;
* Parsing enumerations from text, generic&lt;br /&gt;
* Parsing materials, by checking for an ID or the material name&lt;br /&gt;
==Time==&lt;br /&gt;
[https://github.com/bergerkiller/BKCommonLib/blob/master/src/main/java/com/bergerkiller/bukkit/common/utils/TimeUtil.java TimeUtil] is used to convert between time and text, by interpreting words such as &amp;#039;day&amp;#039; and &amp;#039;night&amp;#039; and turning it into Minecraft time. Although it has something to do with Minecraft, it is still basic logic. Methods:&lt;br /&gt;
&lt;br /&gt;
* get Minecraft time from text&lt;br /&gt;
* get name in text format from Minecraft time&lt;br /&gt;
* getting the current time in a certain date format&lt;/div&gt;</summary>
		<author><name>Bergerhealer Wiki&gt;RyanDo</name></author>
	</entry>
</feed>