Completely rewrite the way modpacks are handled

This commit is contained in:
Salt 2021-02-08 19:23:47 -06:00
parent 199c150ad4
commit 0d4cf0c186
11 changed files with 143 additions and 102 deletions

View File

@ -3,6 +3,7 @@
<head> <head>
<?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-meta.php';?> <?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-meta.php';?>
<link href="/styles/buttons.css" type="text/css" rel="stylesheet" /> <link href="/styles/buttons.css" type="text/css" rel="stylesheet" />
<link href="/minecraft/styles/styles.css" type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="/favicon.ico" /> <link rel="shortcut icon" href="/favicon.ico" />
<title>9iron</title> <title>9iron</title>
</head> </head>
@ -21,108 +22,75 @@
</a> </a>
</div> </div>
</div> </div>
<div class="section"> <?php
<h1>Current Modpacks</h1> # Define a pack card generator function
<div class="subcontainer"> function echo_pack($pack) {
<i class="badge fa fa-star"></i> # Add basic coloration to the element, if it exists
<h2>The 1.7.10 Magic Pack</h2> if (file_exists("packs/$pack/color")) {
<p><code>magic.thefuck.how</code></p> $color = file_get_contents("packs/$pack/color");
<p><a href="/files/magic-1.7.10-2.zip">Download</a> (MultiMC)</p> echo "<div class=\"modpack\" style=\"background: $color; color: var(--background);\">";
<p>1.7.10, Forge 1614</p> } else {
<p>Oh man, this one. We ended up going back to this pack at least 5(?) times because of how well it played. We were enthralled by the amount of content, especially the first time around. It's a heavy magic pack with Botania, Blood Magic, Thaumcraft, Witchery, and as many good addons for each as we could cram in there. It comes with numerous atmosphere mods, like World Tooltips, Dynamic Surroundings, SoundFilters, and more.</p> echo '<div class="modpack">';
<p>It's been thoroughly burned out for us, but it might be right up your alley. May it give you as much entertainment as it gave us.</p> }
<p>A stock install ships with OptiFine, too, but it's not required.</p>
<p>As a 1.7.10 pack, the server will not intelligently disable client-side-only mods. Scour it before deploying.</p> # Push an image if we've got one of those
<p>Changelog:</p> if (file_exists("packs/$pack/icon.png")) {
<ul> echo "<img src=\"/minecraft/packs/$pack/icon.png\" class=\"packicon\"/>";
<li>2020-12-31: Reexported as a MultiMC instance</li> }
<li>Not even fucking trying</li>
</ul> # Get the pack description
</div> $desc = "<h2>$pack</h2><p>A modpack.</p>";
</div> $descfile = "packs/$pack/desc.html";
<div class="section"> if (file_exists($descfile)) {
<h1>Old Modpacks</h1> $desc = file_get_contents($descfile);
<div class="subcontainer"> }
<h2>Material Energy^5</h2> echo "$desc";
<p><a href="/files/me5.zip">Download</a> (MultiMC)</p>
<p>You and a bunch of other guys are locked in an extradimensional space ship. The universe has imploded and your only methods of gathering resources are to scavenge them from small pieces of the universe stored in Spatial I/O cells.</p> # A small button to browse previous world downloads
<p>It includes fun shit like ProjectE (heavily gimped), MineChem, Metallurgy, and the usual suite of tech mods. Heavily quest-focused.</p> if (file_exists("/files/packs/$pack/worlds")) {
</div> echo "<p><a href=\"/files/packs/$pack/worlds\" class=\"worldsbutton\">Browse world backups</a></p>";
<div class="subcontainer"> }
<h2>botaniapack-1</h2>
<p><code>botania.mc.9iron.club</code></p> # And a bright big download button
<p><a href="/files/botaniapack-1.zip">Download</a> (MultiMC)</p> echo "<a href=\"/files/packs/$pack/latest.zip\" class=\"downloadbutton\">Download</a>";
<p>1.10.2, Forge 2511</p> echo '</div>';
<p>A basic modpack with pretty much just Botania and Quark. Initially authored by KidiroInfiniti</p> }
<p>World backups: # Get list of modpacks
<ul> $dir = new DirectoryIterator("packs");
<li>2020-04-08: <a href="/files/survival-2020-04-08-02-30-09.zip">survival</a>, <a href="/files/creative-2020-04-08-03-16-50.zip">creative</a></p></li> $packs = array();
</ul> foreach ($dir as $fileinfo) {
<p>Changelog:</p> if (!$fileinfo->isDot() && $fileinfo->isDir()) {
<ul> array_push($packs, $fileinfo->getFilename());
<li>2020-07-29 - Removed Mo Creatures (fuck you, Carson)</li> }
<li>2020-07-25 - Made pack a MultiMC importable zip</li> }
<li>2020-03-31 - Calmed down Chance Cubes</li>
<li>2020-03-25 - Removed Shoulder Surfing, resolved server-client discrepencies</li> # Parse through and provide their information
<li>2020-03-13 - <em>Server-Side</em>: Added Dynmap, see link next above</li> if (!empty($packs)) {
<li>2020-03-09 - Tweak server roles, bump chunk limit up to 10k</li> echo '<div class="section">';
<li>2020-03-07 - Tweak Wither Skeleton Tweaks to remove OP swords and make skulls easier to get</li> # If we have a current pack, print that upfront
<li>2020-02-29 - <em>Server-Side</em>: Updated Forge chunk limit per ticket to 10k (<a href="https://github.com/FTBTeam/FTB-Utilities/issues/504">#504</a>)</li> if (file_exists("packs/current") && readlink("packs/current")) {
<li>2020-02-28 - Added FTBUtils for chunk loading</li> # We have a valid current pack, remove it from the list and print it upfront
<li>2020-02-25 - Added Quark for TE piston movement, among other things</li> $currentpack = readlink("packs/current");
<li>2020-02-23 - Initial release</li> $packs = array_diff($packs, ["$currentpack", "current"]);
</ul> echo '<h1>Current Modpack</h1>';
</div> echo_pack($currentpack);
<div class="subcontainer"> # If there's a server IP name along with that, print that out too
<h2>Magic Pack Redux</h2> if (file_exists("packs/currentip")) {
<p><code>magic-main.mc.9iron.club</code></p> $ip = file_get_contents("packs/currentip");
<p><a href="/files/magicpackredux.zip">Download</a> (MultiMC)</p> echo "<p><code class=\"bigcode\">$ip</code></p>";
<p>1.12.2, Forge 2673</p> }
<p>The epic saga of the magic pack continues, this time with a version of Blood Magic where cutting yourself is actually a solution and a version of Thaumcraft that is dramatically more lackluster than its ancestors. Comes with other stuff, too, like Embers, Wizardry, Psi, and a whole host of other fun shit.</p> echo '</div><div class="section">';
<p>World Backups:</p> }
<ul> # Sort the list of remaining packs
<li>2020-07-27: <a href="/files/magic-main-2020-07-27.tar.gz">survival</a></li> sort($packs);
</ul> # Print the rest of them
<p>Changelog: </p> echo '<h1>Modpacks</h1><div class="packcontainer">';
<ul> foreach ($packs as $pack) {
<li>2020-06-24: Updated all of the things, switch to MultiMC pack style</li> echo_pack($pack);
<li>2020-06-21: Re-released here for all to enjoy</li> }
<li>????-??-??: Things happened, pack was actually developed</li> echo '</div></div>';
</ul> }
</div> ?>
<div class="subcontainer">
<h2>Rotary Pack</h2>
<p><code>rotary-main.mc.9iron.club</code></p>
<p>Download: <a href="/files/rotarypack-client.zip">Client</a> (simple zip), <a href="/files/rotarypack-server.zip">Server</a></p>
<p>1.7.10, Forge 1614</p>
<p>A pack with a ton of Reika's mods and AE2.</p>
<p>World Backups:</p>
<ul>
<li>2020-07-23: <a href="/files/rotary-main-2020-07-23.tar.gz">survival</a></li>
</ul>
<p>Changelog:</p>
<ul>
<li>2020-07-07: Fixed cable anchor recipe on server</li>
<li>2020-06-01: Initial release</li>
</ul>
</div>
<div class="subcontainer">
<h2>FTB Ultimate Reloaded 1.8.0</h2>
<p><a href="https://www.curseforge.com/minecraft/modpacks/ftb-ultimate-reloaded/files/2746965">Download</a> (Curse)</p>
<p>1.12.2, Forge 2838</p>
<p>It's a remake of FTB Ultimate, and contains such wonderful things as Modular Powersuits and a complete lack of shitty expert mode stuff.</p>
<p>We're using pack version 1.8 instead of 1.9 because this was the last version that the pack authors made a server bundle for. Looks like 1.9 was mostly just patches anyway.</p>
<p>You'll also have to add the following mods:</p>
<ul>
<li><a href="https://www.curseforge.com/minecraft/mc-mods/gravestone-mod/files/2608278">Gravestone Mod</a></li>
</ul>
<p>Changelog:</p>
<ul>
<li>2020-04-24 - Enabled TechReborn power conversion</li>
<li>2020-04-23 - Added NetherPortalFix</li>
</ul>
</div>
</div>
</div> </div>
<?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-footer.php';?> <?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-footer.php';?>
</body> </body>

View File

@ -0,0 +1,3 @@
<h2>Botania</h2>
<p>1.10.2, Forge 2511</p>
<p>A pack with <i>just</i> Botania. And Quark and a couple other minor things. Whatever.</p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@ -0,0 +1,3 @@
<h2>Magic Pack Redux</h2>
<p>1.12.2, Forge 2673</p>
<p>It's like the 1.7.10 Magic Pack, but with more updated mods and dramatically less Thaumcraft. As a bonus, you get Embers, Psi, and a ton of other side mods to explore.</p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

View File

@ -0,0 +1,3 @@
<h2>The Magic Pack</h2>
<p>1.7.10, Forge 1614</p>
<p>A very, <i>very</i> well-run modpack with a ton of magic content. Includes Thaumcraft, Blood Magic, Botania, Witchery, Ars, and a couple others.</p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -0,0 +1,3 @@
<h2>Rotarypack</h2>
<p>1.7.10, Forge 1614</p>
<p>A pack by autists, for autists. Explore revolutionary new power types and hyperrealistic nuclear reactors. And also AE2's there.</p>

1
minecraft/packs/current Symbolic link
View File

@ -0,0 +1 @@
1.7.10-magicpack

View File

@ -0,0 +1 @@
magic.thefuck.how

View File

@ -0,0 +1,59 @@
/*
* styles.css
* Copyright (C) 2021 Vintage Salt
*
* Distributed under terms of the MIT license.
*/
code.bigcode {
display: block;
font-size: 400%;
text-align: center;
margin: auto;
padding: 0.5em;
}
div.packcontainer {
display: grid;
grid-gap: 1em;
grid-template-columns: 1fr 1fr;
}
div.modpack {
background: var(--background-bright);
border-radius: 8px;
box-shadow: 5px 5px var(--shadow);
display: block;
margin: auto 0 0 0;
padding: 1em;
}
div.modpack h2 {
display: inline;
vertical-align: middle;
}
div.modpack a.downloadbutton {
background: var(--link);
border-radius: 8px;
box-shadow: 5px 5px var(--shadow);
color: var(--background);
display: block;
font-size: 120%;
font-weight: bold;
margin: 0 auto;
max-width: 24em;
padding: 1em;
text-align: center;
}
div.modpack a.downloadbutton:hover {
background: var(--link-hover);
}
img.packicon {
border-radius: 50%;
float: right;
height: 48px;
width: 48px;
vertical-align: middle;
}
@media only screen and (max-width: 600px) {
div.packcontainer {
grid-template-columns: 1fr;
}
}