<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://forge.gemwire.uk/index.php?action=history&amp;feed=atom&amp;title=Saved_Data</id>
	<title>Saved Data - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://forge.gemwire.uk/index.php?action=history&amp;feed=atom&amp;title=Saved_Data"/>
	<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Saved_Data&amp;action=history"/>
	<updated>2026-05-22T21:07:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Saved_Data&amp;diff=2880&amp;oldid=prev</id>
		<title>ChampionAsh5357: Update to 1.17</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Saved_Data&amp;diff=2880&amp;oldid=prev"/>
		<updated>2021-08-02T21:01:06Z</updated>

		<summary type="html">&lt;p&gt;Update to 1.17&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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-GB&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:01, 2 August 2021&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='diff-marker'&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 class=&quot;diffchange diffchange-inline&quot;&gt;World Saved Data &lt;/del&gt;is an alternative to capabilities that stores data per dimension or globally depending on how the context is passed.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;SavedData&amp;lt;/code&amp;gt; &lt;/ins&gt;is an alternative to capabilities that stores data per dimension or globally depending on how the context is passed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;==Class Structure==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;==Class Structure==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;The class can be broken down into &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;three &lt;/del&gt;important methods:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The class can be broken down into &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;two &lt;/ins&gt;important methods:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;  - &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;read&lt;/del&gt;&amp;lt;/code&amp;gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Read &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;stored nbt &lt;/del&gt;data&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  - &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;save&lt;/ins&gt;&amp;lt;/code&amp;gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Write &lt;/ins&gt;the data to nbt.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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 class=&quot;diffchange diffchange-inline&quot;&gt; - &amp;lt;code&amp;gt;write&amp;lt;/code&amp;gt;: Write the object &lt;/del&gt;to nbt.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  - &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;setDirty&lt;/ins&gt;&amp;lt;/code&amp;gt;: Tell the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;game that &lt;/ins&gt;the data &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;has changed and needs to be saved &lt;/ins&gt;to file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;  - &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;markDirty&lt;/del&gt;&amp;lt;/code&amp;gt;: Tell the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;object to save &lt;/del&gt;the data to file.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;The &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;read&lt;/del&gt;&amp;lt;/code&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &amp;lt;code&amp;gt;write&amp;lt;/code&amp;gt; methods &lt;/del&gt;need to be implemented while &amp;lt;code&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;markDirty&lt;/del&gt;&amp;lt;/code&amp;gt; should be called whenever the data is going to be manipulated. As the class is abstract, it should be subclassed with these three methods implemented.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;save&lt;/ins&gt;&amp;lt;/code&amp;gt; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;method &lt;/ins&gt;need to be implemented while &amp;lt;code&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;setDirty&lt;/ins&gt;&amp;lt;/code&amp;gt; should be called whenever the data is going to be manipulated. As the class is abstract, it should be subclassed with these three methods implemented.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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 class=&quot;diffchange diffchange-inline&quot;&gt;The super call requires a &amp;lt;code&amp;gt;String&amp;lt;/code&amp;gt; argument. This is used &lt;/del&gt;to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;denote the name of the data file within the dimension itself. For example, if the argument was &amp;quot;pipes&amp;quot;, then &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file would be created within each dimension folder called &amp;lt;code&amp;gt;data/pipes.dat&amp;lt;/code&amp;gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;==Attaching &lt;/ins&gt;to a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Level ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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 class=&quot;diffchange diffchange-inline&quot;&gt;==Attaching &lt;/del&gt;to a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Dimension==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;To attach a Saved Data &lt;/ins&gt;to a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;particular level, you must have access to an instance of &amp;lt;code&amp;gt;ServerLevel&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ServerChunkCache&amp;lt;/code&amp;gt;. From there, you can call the method &amp;lt;code&amp;gt;#getSavedData&amp;lt;/code&amp;gt; which will give you an instance of the &amp;lt;code&amp;gt;DimensionDataStorage&amp;lt;/code&amp;gt;: the class that stores all saved data for that particular dimension. You can attach an instance or get the current instance of the data using &amp;lt;code&amp;gt;DimensionDataStorage#computeIfAbsent&amp;lt;/code&amp;gt;. This takes in three arguments: the first to construct a saved data with data already existing in some &amp;lt;code&amp;gt;CompoundTag&amp;lt;/code&amp;gt;, the second to construct a saved data with no existing data, and the third to specify the name of the file to save the data to within the &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; folder in the overworld or in the specific dimension of the save.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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 class=&quot;diffchange diffchange-inline&quot;&gt;To attach a World Saved Data to a particular dimension, you must have access to an instance of &amp;lt;code&amp;gt;ServerWorld&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ServerChunkProvider&amp;lt;/code&amp;gt;. From there, you can call &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;method &amp;lt;code&amp;gt;#getSavedData&amp;lt;/code&amp;gt; which will give you an instance of the &amp;lt;code&amp;gt;DimensionSavedDataManager&amp;lt;/code&amp;gt;: the class that stores all saved data for &lt;/del&gt;that &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;particular dimension. You can attach an instance or get the current instance of the data using &amp;lt;code&amp;gt;DimensionSavedDataManager#getOrCreate&amp;lt;/code&amp;gt;. This &lt;/del&gt;should be &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;used in most cases &lt;/del&gt;to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;get an instance of &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;specified data or create a new one if not available. From there, you can operate on your saved data &lt;/del&gt;as &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;if it was a capability.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Global attachments are &lt;/ins&gt;the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;same except &lt;/ins&gt;that &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;they &lt;/ins&gt;should &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;only &lt;/ins&gt;be &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;attached &lt;/ins&gt;to the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;overworld &lt;/ins&gt;as &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;that level will always persist&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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 class=&quot;diffchange diffchange-inline&quot;&gt;Global attachments are the same by either synchronizing the data between the three worlds or using the same object reference stored in each world&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;[[Category:Data Storage]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;[[Category:Data Storage]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ChampionAsh5357</name></author>
	</entry>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Saved_Data&amp;diff=2874&amp;oldid=prev</id>
		<title>ChampionAsh5357: ChampionAsh5357 moved page World Saved Data to Saved Data: Class rename</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Saved_Data&amp;diff=2874&amp;oldid=prev"/>
		<updated>2021-08-02T19:43:29Z</updated>

		<summary type="html">&lt;p&gt;ChampionAsh5357 moved page &lt;a href=&quot;/wiki/World_Saved_Data&quot; class=&quot;mw-redirect&quot; title=&quot;World Saved Data&quot;&gt;Saved Data&lt;/a&gt; to &lt;a href=&quot;/wiki/Saved_Data&quot; title=&quot;Saved Data&quot;&gt;Saved Data&lt;/a&gt;: Class rename&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:43, 2 August 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>ChampionAsh5357</name></author>
	</entry>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Saved_Data&amp;diff=2638&amp;oldid=prev</id>
		<title>ShrimpBot: Categorize with Category:Data Storage by SizableShrimp#0755</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Saved_Data&amp;diff=2638&amp;oldid=prev"/>
		<updated>2021-05-19T00:59:44Z</updated>

		<summary type="html">&lt;p&gt;Categorize with &lt;a href=&quot;/index.php?title=Category:Data_Storage&amp;amp;action=tinymceedit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:Data Storage (page does not exist)&quot;&gt;Category:Data Storage&lt;/a&gt; by SizableShrimp#0755&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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-GB&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 00:59, 19 May 2021&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-l17&quot; &gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;td class='diff-marker'&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;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&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;Global attachments are the same by either synchronizing the data between the three worlds or using the same object reference stored in each world.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&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;Global attachments are the same by either synchronizing the data between the three worlds or using the same object reference stored in each world.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Data Storage]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>ShrimpBot</name></author>
	</entry>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Saved_Data&amp;diff=2250&amp;oldid=prev</id>
		<title>ChampionAsh5357: Basic WSD Explanation</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Saved_Data&amp;diff=2250&amp;oldid=prev"/>
		<updated>2020-12-20T06:45:53Z</updated>

		<summary type="html">&lt;p&gt;Basic WSD Explanation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;World Saved Data is an alternative to capabilities that stores data per dimension or globally depending on how the context is passed.&lt;br /&gt;
&lt;br /&gt;
==Class Structure==&lt;br /&gt;
&lt;br /&gt;
The class can be broken down into three important methods:&lt;br /&gt;
 - &amp;lt;code&amp;gt;read&amp;lt;/code&amp;gt;: Read the stored nbt data.&lt;br /&gt;
 - &amp;lt;code&amp;gt;write&amp;lt;/code&amp;gt;: Write the object to nbt.&lt;br /&gt;
 - &amp;lt;code&amp;gt;markDirty&amp;lt;/code&amp;gt;: Tell the object to save the data to file.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;read&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;write&amp;lt;/code&amp;gt; methods need to be implemented while &amp;lt;code&amp;gt;markDirty&amp;lt;/code&amp;gt; should be called whenever the data is going to be manipulated. As the class is abstract, it should be subclassed with these three methods implemented.&lt;br /&gt;
&lt;br /&gt;
The super call requires a &amp;lt;code&amp;gt;String&amp;lt;/code&amp;gt; argument. This is used to denote the name of the data file within the dimension itself. For example, if the argument was &amp;quot;pipes&amp;quot;, then a file would be created within each dimension folder called &amp;lt;code&amp;gt;data/pipes.dat&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Attaching to a Dimension==&lt;br /&gt;
&lt;br /&gt;
To attach a World Saved Data to a particular dimension, you must have access to an instance of &amp;lt;code&amp;gt;ServerWorld&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ServerChunkProvider&amp;lt;/code&amp;gt;. From there, you can call the method &amp;lt;code&amp;gt;#getSavedData&amp;lt;/code&amp;gt; which will give you an instance of the &amp;lt;code&amp;gt;DimensionSavedDataManager&amp;lt;/code&amp;gt;: the class that stores all saved data for that particular dimension. You can attach an instance or get the current instance of the data using &amp;lt;code&amp;gt;DimensionSavedDataManager#getOrCreate&amp;lt;/code&amp;gt;. This should be used in most cases to get an instance of the specified data or create a new one if not available. From there, you can operate on your saved data as if it was a capability.&lt;br /&gt;
&lt;br /&gt;
Global attachments are the same by either synchronizing the data between the three worlds or using the same object reference stored in each world.&lt;/div&gt;</summary>
		<author><name>ChampionAsh5357</name></author>
	</entry>
</feed>