Skip to content

Commit

Permalink
mdbook.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperScary committed Jun 20, 2024
1 parent db07651 commit ed4c298
Show file tree
Hide file tree
Showing 63 changed files with 6,243 additions and 97 deletions.
12 changes: 11 additions & 1 deletion book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ authors = ["SuperScary"]
language = "en"
multilingual = false
src = "src/book"
title = "Heavy Inventories"
title = "Documentation"

[preprocessor]

[preprocessor.mermaid]
command = "mdbook-mermaid"

[output]

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]
24 changes: 21 additions & 3 deletions book/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Page not found - Heavy Inventories</title>
<title>Page not found - Documentation</title>
<base href="/">


Expand Down Expand Up @@ -89,7 +89,7 @@

<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="chapter_1.html"><strong aria-hidden="true">1.</strong> What is Heavy Inventories</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_1.1.html"><strong aria-hidden="true">1.1.</strong> Features</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_2.html"><strong aria-hidden="true">2.</strong> Setup</a></li><li class="chapter-item expanded "><a href="chapter_3.html"><strong aria-hidden="true">3.</strong> Understanding Weight Files</a></li><li class="chapter-item expanded "><a href="chapter_4.html"><strong aria-hidden="true">4.</strong> Data Manipulation</a></li><li class="chapter-item expanded "><a href="chapter_5.html"><strong aria-hidden="true">5.</strong> Sided Configurations</a></li><li class="chapter-item expanded "><a href="chapter_6.html"><strong aria-hidden="true">6.</strong> Item Weights</a></li><li class="chapter-item expanded "><a href="chapter_7.html"><strong aria-hidden="true">7.</strong> Player Weights</a></li><li class="chapter-item expanded "><a href="chapter_8.html"><strong aria-hidden="true">8.</strong> Machine Learning</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_8.1.html"><strong aria-hidden="true">8.1.</strong> The Aim</a></li><li class="chapter-item expanded "><a href="chapter_8.2.html"><strong aria-hidden="true">8.2.</strong> Conventional Methods</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_9.html"><strong aria-hidden="true">9.</strong> Understanding the Machine Learning Logic</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_9.1.html"><strong aria-hidden="true">9.1.</strong> How Does it Work</a></li><li class="chapter-item expanded "><a href="chapter_9.2.html"><strong aria-hidden="true">9.2.</strong> The Recipe Finder</a></li><li class="chapter-item expanded "><a href="chapter_9.3.html"><strong aria-hidden="true">9.3.</strong> Color Ratios</a></li><li class="chapter-item expanded "><a href="chapter_9.4.html"><strong aria-hidden="true">9.4.</strong> Figure Material</a></li></ol></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="chapter_1.html"><strong aria-hidden="true">1.</strong> What is Heavy Inventories</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_1.1.html"><strong aria-hidden="true">1.1.</strong> Class Structure</a></li><li class="chapter-item expanded "><a href="chapter_1.2.html"><strong aria-hidden="true">1.2.</strong> Features</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_2.html"><strong aria-hidden="true">2.</strong> Setup</a></li><li class="chapter-item expanded "><a href="chapter_3.html"><strong aria-hidden="true">3.</strong> Understanding Weight Files</a></li><li class="chapter-item expanded "><a href="chapter_4.html"><strong aria-hidden="true">4.</strong> Data Manipulation</a></li><li class="chapter-item expanded "><a href="chapter_5.html"><strong aria-hidden="true">5.</strong> Sided Configurations</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_5.1.html"><strong aria-hidden="true">5.1.</strong> Client</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_5.1.1.html"><strong aria-hidden="true">5.1.1.</strong> Rendering</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_5.2.html"><strong aria-hidden="true">5.2.</strong> Common</a></li><li class="chapter-item expanded "><a href="chapter_5.3.html"><strong aria-hidden="true">5.3.</strong> Server</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_6.html"><strong aria-hidden="true">6.</strong> Item Weights</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_6.1.html"><strong aria-hidden="true">6.1.</strong> Item Weight Effects</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_7.html"><strong aria-hidden="true">7.</strong> Player Weights</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_7.1.html"><strong aria-hidden="true">7.1.</strong> Player Weight Effects</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_8.html"><strong aria-hidden="true">8.</strong> Machine Learning</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_8.1.html"><strong aria-hidden="true">8.1.</strong> The Aim</a></li><li class="chapter-item expanded "><a href="chapter_8.2.html"><strong aria-hidden="true">8.2.</strong> Conventional Methods</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_9.html"><strong aria-hidden="true">9.</strong> Understanding the Machine Learning Logic</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_9.1.html"><strong aria-hidden="true">9.1.</strong> How Does it Work?</a></li><li class="chapter-item expanded "><a href="chapter_9.2.html"><strong aria-hidden="true">9.2.</strong> The Recipe Finder</a></li><li class="chapter-item expanded "><a href="chapter_9.3.html"><strong aria-hidden="true">9.3.</strong> Color Ratios</a></li><li class="chapter-item expanded "><a href="chapter_9.4.html"><strong aria-hidden="true">9.4.</strong> Figure Material</a></li><li class="chapter-item expanded "><a href="chapter_9.5.html"><strong aria-hidden="true">9.5.</strong> How is This Data Used?</a></li></ol></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
<div class="sidebar-resize-indicator"></div>
Expand Down Expand Up @@ -142,7 +142,7 @@
</button>
</div>

<h1 class="menu-title">Heavy Inventories</h1>
<h1 class="menu-title">Documentation</h1>

<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
Expand Down Expand Up @@ -194,6 +194,22 @@ <h1 id="document-not-found-404"><a class="header" href="#document-not-found-404"

</div>

<!-- Livereload script (if served using the cli tool) -->
<script>
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
const socket = new WebSocket(wsAddress);
socket.onmessage = function (event) {
if (event.data === "reload") {
socket.close();
location.reload();
}
};

window.onbeforeunload = function() {
socket.close();
}
</script>



Expand All @@ -211,6 +227,8 @@ <h1 id="document-not-found-404"><a class="header" href="#document-not-found-404"
<script src="book.js"></script>

<!-- Custom JS scripts -->
<script src="mermaid.min.js"></script>
<script src="mermaid-init.js"></script>


</div>
Expand Down
77 changes: 71 additions & 6 deletions book/chapter_1.1.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Features - Heavy Inventories</title>
<title>Class Structure - Documentation</title>


<!-- Custom HTML head -->
Expand Down Expand Up @@ -88,7 +88,7 @@

<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="chapter_1.html"><strong aria-hidden="true">1.</strong> What is Heavy Inventories</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_1.1.html" class="active"><strong aria-hidden="true">1.1.</strong> Features</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_2.html"><strong aria-hidden="true">2.</strong> Setup</a></li><li class="chapter-item expanded "><a href="chapter_3.html"><strong aria-hidden="true">3.</strong> Understanding Weight Files</a></li><li class="chapter-item expanded "><a href="chapter_4.html"><strong aria-hidden="true">4.</strong> Data Manipulation</a></li><li class="chapter-item expanded "><a href="chapter_5.html"><strong aria-hidden="true">5.</strong> Sided Configurations</a></li><li class="chapter-item expanded "><a href="chapter_6.html"><strong aria-hidden="true">6.</strong> Item Weights</a></li><li class="chapter-item expanded "><a href="chapter_7.html"><strong aria-hidden="true">7.</strong> Player Weights</a></li><li class="chapter-item expanded "><a href="chapter_8.html"><strong aria-hidden="true">8.</strong> Machine Learning</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_8.1.html"><strong aria-hidden="true">8.1.</strong> The Aim</a></li><li class="chapter-item expanded "><a href="chapter_8.2.html"><strong aria-hidden="true">8.2.</strong> Conventional Methods</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_9.html"><strong aria-hidden="true">9.</strong> Understanding the Machine Learning Logic</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_9.1.html"><strong aria-hidden="true">9.1.</strong> How Does it Work</a></li><li class="chapter-item expanded "><a href="chapter_9.2.html"><strong aria-hidden="true">9.2.</strong> The Recipe Finder</a></li><li class="chapter-item expanded "><a href="chapter_9.3.html"><strong aria-hidden="true">9.3.</strong> Color Ratios</a></li><li class="chapter-item expanded "><a href="chapter_9.4.html"><strong aria-hidden="true">9.4.</strong> Figure Material</a></li></ol></li></ol>
<ol class="chapter"><li class="chapter-item expanded "><a href="chapter_1.html"><strong aria-hidden="true">1.</strong> What is Heavy Inventories</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_1.1.html" class="active"><strong aria-hidden="true">1.1.</strong> Class Structure</a></li><li class="chapter-item expanded "><a href="chapter_1.2.html"><strong aria-hidden="true">1.2.</strong> Features</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_2.html"><strong aria-hidden="true">2.</strong> Setup</a></li><li class="chapter-item expanded "><a href="chapter_3.html"><strong aria-hidden="true">3.</strong> Understanding Weight Files</a></li><li class="chapter-item expanded "><a href="chapter_4.html"><strong aria-hidden="true">4.</strong> Data Manipulation</a></li><li class="chapter-item expanded "><a href="chapter_5.html"><strong aria-hidden="true">5.</strong> Sided Configurations</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_5.1.html"><strong aria-hidden="true">5.1.</strong> Client</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_5.1.1.html"><strong aria-hidden="true">5.1.1.</strong> Rendering</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_5.2.html"><strong aria-hidden="true">5.2.</strong> Common</a></li><li class="chapter-item expanded "><a href="chapter_5.3.html"><strong aria-hidden="true">5.3.</strong> Server</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_6.html"><strong aria-hidden="true">6.</strong> Item Weights</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_6.1.html"><strong aria-hidden="true">6.1.</strong> Item Weight Effects</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_7.html"><strong aria-hidden="true">7.</strong> Player Weights</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_7.1.html"><strong aria-hidden="true">7.1.</strong> Player Weight Effects</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_8.html"><strong aria-hidden="true">8.</strong> Machine Learning</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_8.1.html"><strong aria-hidden="true">8.1.</strong> The Aim</a></li><li class="chapter-item expanded "><a href="chapter_8.2.html"><strong aria-hidden="true">8.2.</strong> Conventional Methods</a></li></ol></li><li class="chapter-item expanded "><a href="chapter_9.html"><strong aria-hidden="true">9.</strong> Understanding the Machine Learning Logic</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="chapter_9.1.html"><strong aria-hidden="true">9.1.</strong> How Does it Work?</a></li><li class="chapter-item expanded "><a href="chapter_9.2.html"><strong aria-hidden="true">9.2.</strong> The Recipe Finder</a></li><li class="chapter-item expanded "><a href="chapter_9.3.html"><strong aria-hidden="true">9.3.</strong> Color Ratios</a></li><li class="chapter-item expanded "><a href="chapter_9.4.html"><strong aria-hidden="true">9.4.</strong> Figure Material</a></li><li class="chapter-item expanded "><a href="chapter_9.5.html"><strong aria-hidden="true">9.5.</strong> How is This Data Used?</a></li></ol></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
<div class="sidebar-resize-indicator"></div>
Expand Down Expand Up @@ -141,7 +141,7 @@
</button>
</div>

<h1 class="menu-title">Heavy Inventories</h1>
<h1 class="menu-title">Documentation</h1>

<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
Expand Down Expand Up @@ -173,7 +173,54 @@ <h1 class="menu-title">Heavy Inventories</h1>

<div id="content" class="content">
<main>
<h1 id="features"><a class="header" href="#features">Features</a></h1>
<h1 id="class-structure"><a class="header" href="#class-structure">Class Structure</a></h1>
<h2 id="launch-classes"><a class="header" href="#launch-classes">Launch classes</a></h2>
<div class="table-wrapper"><table><thead><tr><th>Class Name</th><th>Type</th><th>Function</th></tr></thead><tbody>
<tr><td>HeavyInventories.java</td><td>Interface</td><td>Contains base logic for all classes to use.</td></tr>
<tr><td>ModBootstrap.java</td><td>Class</td><td>Differentiates the modded environment between client and server.</td></tr>
<tr><td>ModClient.java</td><td>Class</td><td>The client sided logic of the mod.</td></tr>
<tr><td>ModServer.java</td><td>Class</td><td>The server sided logic of the mod.</td></tr>
<tr><td>ModBase.java</td><td>Class</td><td>The common sided logic of the mod. Both ModClient and Mod Server inherit from this class</td></tr>
</tbody></table>
</div>
<p>The ModBootstrap class is seen by NeoForge as the main class file since it contains the @Mod annotation. The sole function of
this class is to delegate whether the mod is in a client environment or server environment and uses a switch to load
either the Client or Server. It is done this way so there is no interpolating conflicts between sides.</p>
<pre><code class="language-java">package superscary.heavyinventories;

import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLEnvironment;

@Mod(HeavyInventories.MODID)
public class ModBootstrap {

public ModBootstrap (IEventBus modEventBus, ModContainer modContainer) {
switch (FMLEnvironment.dist) {
case CLIENT -&gt; new ModClient(modEventBus, modContainer);
case DEDICATED_SERVER -&gt; new ModServer(modEventBus, modContainer);
}
}

}
</code></pre>
<h2 id="data-flow"><a class="header" href="#data-flow">Data Flow</a></h2>
<p>ModBootstrap is the first to be called by the mod launcher, which it then differentiates between a modded client or server.
The client and server java files inherit from the abstract class ModBase which creates the common logic needed to create
data files.</p>
<pre class="mermaid"> flowchart LR;
ModBootstrap.java--&gt; |Client| ModClient.java;
ModBootstrap.java--&gt; |Server| ModServer.java;
ModClient.java--&gt;Client_Logic[Client Logic];
ModServer.java&lt;--&gt;ModBase.java;
ModServer.java--&gt;Server_Logic[Server Logic];
ModClient.java&lt;--&gt;ModBase.java;
ModBase.java--&gt;Common_Logic[Common Logic];
</pre>
<h3 id="modbasejava"><a class="header" href="#modbasejava">ModBase.java</a></h3>
<p>This class is inherited by both client and server. It is responsible for the logic needed on both sides. This class also
registers all Codecs and DataAttachments as well as calling the ModFinder on postLoad.</p>

</main>

Expand All @@ -183,7 +230,7 @@ <h1 id="features"><a class="header" href="#features">Features</a></h1>
<i class="fa fa-angle-left"></i>
</a>

<a rel="next prefetch" href="chapter_2.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next prefetch" href="chapter_1.2.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>

Expand All @@ -197,13 +244,29 @@ <h1 id="features"><a class="header" href="#features">Features</a></h1>
<i class="fa fa-angle-left"></i>
</a>

<a rel="next prefetch" href="chapter_2.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next prefetch" href="chapter_1.2.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>

</div>

<!-- Livereload script (if served using the cli tool) -->
<script>
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
const socket = new WebSocket(wsAddress);
socket.onmessage = function (event) {
if (event.data === "reload") {
socket.close();
location.reload();
}
};

window.onbeforeunload = function() {
socket.close();
}
</script>



Expand All @@ -221,6 +284,8 @@ <h1 id="features"><a class="header" href="#features">Features</a></h1>
<script src="book.js"></script>

<!-- Custom JS scripts -->
<script src="mermaid.min.js"></script>
<script src="mermaid-init.js"></script>


</div>
Expand Down
Loading

0 comments on commit ed4c298

Please sign in to comment.