Unruled Api: Difference between revisions

Created page with "{{Infobox mod|title=Unruled API|image=Unruled_api_icon.png|author=RecraftorsMC|developer=Nerjal Nosk|latest_release=0.6 (2025-01-03)|initial_release=0.1 (2024-01-24)|modloader={{Fabric}},{{NeoForge}}|minecraft_version=active:{{1.21}}, {{1.21}} <br> inactive: {{1.18}}, {{1.19}}|modrinth=https://modrinth.com/mod/unruled-api|sources=https://codeberg.org/RecraftorsMC/unruled-api}} '''Unruled API''' is a library mod, that allows other mod to easily creat..."
 
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Infobox mod|title=Unruled API|image=Unruled_api_icon.png|author=RecraftorsMC|developer=[[User:Nerjal Nosk|Nerjal Nosk]]|latest_release=0.6 (2025-01-03)|initial_release=0.1 (2024-01-24)|modloader={{Fabric}},{{NeoForge}}|minecraft_version=active:{{1.21}}, {{1.21}} <br> inactive: {{1.18}}, {{1.19}}|modrinth=https://modrinth.com/mod/unruled-api|sources=https://codeberg.org/RecraftorsMC/unruled-api}}
{{Infobox mod|title=Unruled API|image=Unruled_api_icon.png|author=Nerjal Nosk|developer=[[User:Nerjal Nosk|Nerjal Nosk]]|latest_release=0.6 (2025-01-03)|initial_release=0.1 (2024-01-24)|modloader={{Fabric}},{{NeoForge}}|minecraft_version=active:{{1.21}}, {{1.20}} <br> inactive: {{1.18}}, {{1.19}}|modrinth=https://modrinth.com/mod/unruled-api|sources=https://codeberg.org/RecraftorsMC/unruled-api}}


'''Unruled API''' is a library mod, that allows other mod to easily create new gamerules, using new kind of gamerules, new tools to tweak them, and provide more control over the game without the need for brand new functionalities like complex configuration files.
'''Unruled API''' is a library mod, that allows other mod to easily create new gamerules, using new kind of gamerules, new tools to tweak them, and provide more control over the game without the need for brand new functionalities like complex configuration files.
Line 10: Line 10:


Since 0.1:
Since 0.1:
<li>
<ul>
   <ul>Floating gamerules
   <li>Floating gamerules
   <li>
   <ul>
     <ul>Stores a <i>float</i> value, with precision ranging from 2<sup>-126</sup> to 2<sup>127</sup></ul>
     <li>Stores a <i>float</i> value, with precision ranging from 2<sup>-126</sup> to 2<sup>127</sup></li>
  </ul>
   </li>
   </li>
  <li>Long gamerules
  <ul>
    <li>Stores a <i>long</i> value, ranging from -2<sup>63</sup> to 2<sup>63</sup>-1</li>
   </ul>
   </ul>
  <ul>Long gamerules
  <li>
    <ul>Stores a <i>long</i> value, ranging from -2<sup>63</sup> to 2<sup>63</sup>-1</ul>
   </li>
   </li>
  <li>Double gamerules
  <ul>
    <li>Stores a <i>double</i> value, with precision ranging from 2<sup>-1022</sup> to 2<sup>1023</sup></li>
   </ul>
   </ul>
  <ul>Double gamerules
  <li>
    <ul>Stores a <i>double</i> value, with precision ranging from 2<sup>-1022</sup> to 2<sup>1023</sup></ul>
   </li>
   </li>
  <li>String gamerules
  <ul>
    <li>Stores a short textual value, with a hard maximum length of 128 characters.</li>
   </ul>
   </ul>
  <ul>String gamerules
  <li>
    <ul>Stores a short textual value, with a hard maximum length of 128 characters.</ul>
   </li>
   </li>
  <li>Text gamerules
  <ul>
    <li>Stores a textual value, with an arbitrary maximum length to be determined by the mod creating the gamerule.</li>
   </ul>
   </ul>
  <ul>Text gamerules
  <li>
    <ul>Stores a textual value, with an arbitrary maximum length to be determined by the mod creating the gamerule.</ul>
   </li>
   </li>
  <li>Enum gamerules
  <ul>
    <li>Stores an enum value, from a specified enum class. Values are parsed and recognized by name, and only those are suggested to the player upon trying to modify the gamerule's value from the chat.</li>
   </ul>
   </ul>
  <ul>Enum gamerules
  <li>
    <ul>Stores an enum value, from a specified enum class. Values are parsed and recognized by name, and only those are suggested to the player upon trying to modify the gamerule's value from the chat.</ul>
   </li>
   </li>
  </ul>
</ul>
</li>


Since 0.6
Since 0.6


<li>
<ul>
   <ul>Registry Entry gamerules
   <li>Registry Entry gamerules
   <li>
   <ul>
     <ul>Stores a {{Registry}} entry value as a {{Resource_Location}}, and matches it with the appropriate registry value for the mod creating the gamerule to use.</ul>
     <li>Stores a {{Registry}} entry value as a {{Resource_Location}}, and matches it with the appropriate registry value for the mod creating the gamerule to use.</li>
  </ul>
   </li>
   </li>
  </ul>
</ul>
</li>


All gamerule types have integration with the World Creation's Gamerules menu. However, due to menu development not being the strong suit of the developer, text rules' integration is marked as <i>Not Yet Implemented</i>, in view of a future easier mean to edit long to very long textual fields in a single menu.
All gamerule types have integration with the World Creation's Gamerules menu. However, due to menu development not being the strong suit of the developer, text rules' integration is marked as <i>Not Yet Implemented</i>, in view of a future easier mean to edit long to very long textual fields in a single menu.
Line 62: Line 62:


If the value is rejected by the validator, then the adapter will take it, and possibly try to provide a better fitting value. This new value will then be tested again with the validator for a final consistency check. Then only, if accepted, will the gamerule's value change.
If the value is rejected by the validator, then the adapter will take it, and possibly try to provide a better fitting value. This new value will then be tested again with the validator for a final consistency check. Then only, if accepted, will the gamerule's value change.
{{DEFAULTSORT:Unruled API}}
[[Category:Mods]]