mirror of
https://github.com/peter-tanner/peter-tanner.github.io.git
synced 2024-11-30 20:10:18 +08:00
35 lines
3.8 KiB
HTML
35 lines
3.8 KiB
HTML
|
<a class="link" style="left:1%; top: 1%; position: absolute;" href="https://npc-strider.github.io">🔗 Back to home page</a><br><br><br>
|
||
|
|
||
|
These graphs are interactive - scroll controls the zoom (alternatively, hover over the bottom-left corner and use the magnifying glass to select an area). Use the home icon to reset the view.
|
||
|
|
||
|
<div style="text-align: center;">
|
||
|
<h1>Absolute frequency</h1>
|
||
|
<iframe id="inlineFrameExample"
|
||
|
title="Absolute frequency"
|
||
|
src="abs_freq.html"
|
||
|
onload="this.style.height=this.contentWindow.document.body.scrollHeight;this.style.width=this.contentWindow.document.body.scrollWidth;">
|
||
|
</iframe><br>
|
||
|
*Note that unfortunately the ore per chunk layer doesn't appear on the right y-axis. You can add the right axis by using the formula: y/(2*512/16)**2<br><br>
|
||
|
<hr>
|
||
|
<h1>Relative frequency</h1>
|
||
|
<iframe id="inlineFrameExample"
|
||
|
title="Relative frequency"
|
||
|
src="rel_freq.html"
|
||
|
onload="this.style.height=this.contentWindow.document.body.scrollHeight;this.style.width=this.contentWindow.document.body.scrollWidth;">
|
||
|
</iframe>
|
||
|
</div><br>
|
||
|
<hr><br>
|
||
|
This text was copy-pasted from the github repo at https://github.com/npc-strider/minecraft-ore-analysis
|
||
|
<h1 id="minecraft-ore-analysis">Minecraft ore analysis</h1>
|
||
|
<h2 id="let-s-see-how-the-new-cave-update-ore-generation-compares-to-the-old-">Let's see how the new cave update ore generation compares to the old!</h2>
|
||
|
<h2 id="go-to-https-npc-strider-github-io-cave-update-ore-analysis-for-interactive-graphs-">Go to <a href="https://npc-strider.github.io/cave-update-ore-analysis">https://npc-strider.github.io/cave-update-ore-analysis</a> for interactive graphs!</h2>
|
||
|
<h3 id="both-tests-performed-with-seed-0-and-single-biome-mode-enabled-extreme-hills-biome-only-to-include-emerald-ore-statistics-size-of-1024-1024-scanned-">Both tests performed with seed 0 and single biome mode enabled (Extreme hills biome only, to include emerald ore statistics). Size of 1024*1024 scanned.</h3>
|
||
|
<h3 id="original-world-files-used-for-research-are-located-at-https-drive-google-com-drive-folders-1rsmfdp4nl5kafwfcpl5sank6cgup45to-usp-sharing">Original world files used for research are located at <a href="https://drive.google.com/drive/folders/1RsmfDp4nl5KaFWfCpL5sanK6cGUp45TO?usp=sharing">https://drive.google.com/drive/folders/1RsmfDp4nl5KaFWfCpL5sanK6cGUp45TO?usp=sharing</a></h3>
|
||
|
<p>#</p>
|
||
|
<p>The scripts I've created take advantage of a slightly modified <a href="https://github.com/DonoA/PyAnvilEditor">PyAnvilEditor</a> to parse the region files.</p>
|
||
|
<p>I've replaced the code in the <code>276</code> (and everything else under <code>def close(self):</code>) of the <code>world</code> class of PyAnvilEditor with <code>true</code> - this is because I'm not writing to the world file, I only intend to read from it. This saves a large amount of time spent writing that would go to waste.</p>
|
||
|
<p>To generate the graphs I've used Matplotlib and I use mpld3 to convert these graphs into interactive html files for use on my website.</p>
|
||
|
<p>We load a large section of the world into memory - ideally, you want to set the block size to the maximum as this is quicker than loading small sections of the world repeatedly. Then we iterate through each coordinate in the block - this takes about 90 seconds with a block radius of <code>128</code>. At each coordinate we iterate each count for a tile in a particular layer. Once a whole block has been processed, we add it to the total.</p>
|
||
|
<p>The 'sum' represents the total amount of a particular ore block within the whole sample (A 1024*1024 square meter area). The relative frequency represents the proportion of the total amount of a particular ore that occurs at a particular y-level.</p>
|
||
|
<p>This sample size can be improved on but it would obviously take longer given that my RAM is limited.</p>
|