mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-28 23:59:25 +00:00
Update gog page, partially fix lexicon page
This commit is contained in:
1 parent
4aeb955de9
commit
566c29a809
2 files changed
+29
-28
No files matched your search
@@ -6,8 +6,9 @@
|
||||
<b>Garden of Glass</b> is a botania addon. Having installed will allow you to create a <b>skyblock</b> type world.<br>
|
||||
Aside from allowing you to have a skyblock world, a few items and blocks are added, as well as some recipes in botania tweaked to fit the skyblock.<br>
|
||||
The goal of this addon is to allow for every single item in the game to be acquired properly in a skyblock evironment.<br>
|
||||
The <b>GardenOfGlass.jar</b> file required to play this mode is simply an empty mod, used to signal to the base Botania mod to enable the GoG features.<br>
|
||||
This jar doesn't need to be updated, only the base Botania one does. In order for Garden of Glass to work, you need at least <b>Botania r1.7-199</b>.<br><br>
|
||||
The jar file required to play this mode is a mod, but contains no code and behaves similarly to a glorified datapack.<br>
|
||||
It contains the recipe changes to the base game, and signals to the base Botania mod to enable other GoG features.<br>
|
||||
In order for Garden of Glass to work, you need at least <b>Botania r1.7-199</b>.<br><br>
|
||||
<b><a href="https://twitter.com/Vazkii/status/622105452457906176">Garden of Glass for Server Owners</a></b><br><br>
|
||||
<a class="btn btn-lg btn-material-cyan" href="https://minecraft.curseforge.com/projects/botania-garden-of-glass" role="button" style="width:500px">Download Garden of Glass</a>
|
||||
<hr>
|
||||
|
||||
+26
-26
@@ -12,32 +12,32 @@
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$file = file('https://raw.githubusercontent.com/Vazkii/Botania/master/src/main/resources/assets/botania/lang/en_us.lang');
|
||||
$file = file_get_contents('https://raw.githubusercontent.com/Vazkii/Botania/master/src/main/resources/assets/botania/lang/en_us.json');
|
||||
$json = json_decode($file, true);
|
||||
|
||||
$started_docs = false;
|
||||
$opened_div = false;
|
||||
|
||||
$current_entry = '';
|
||||
foreach($file as $line) {
|
||||
if($started_docs || trim($line) == '# LEXICON ENTRIES') {
|
||||
$started_docs = true;
|
||||
$entry_match = match_entry($line);
|
||||
$page_match = match_page($line, $current_entry);
|
||||
|
||||
if(sizeof($entry_match) > 0) {
|
||||
$current_entry = $entry_match[1];
|
||||
if($opened_div)
|
||||
echo('</div>');
|
||||
|
||||
echo("<br><a href='#$current_entry' class='entry-bookmark glyphicon glyphicon-bookmark' title='Permalink'></a> <b id='$current_entry-fake'>$entry_match[2]</b><div class='entry-text'>");
|
||||
$opened_div = true;
|
||||
}
|
||||
|
||||
if(sizeof($page_match) > 0) {
|
||||
$page = preg_replace('/&(.)((?:[^&])+)(?:(?:&(?:0|r))|$)/', "<span class='mc-color-$1'>$2</span>", $page_match[1]) . '<br>';
|
||||
$no_control = preg_replace('/&./', '', $page_match[1]);
|
||||
if(strlen($no_control) > 50)
|
||||
echo($page);
|
||||
foreach($json as $key => $value) {
|
||||
$entry_match = match_entry($key);
|
||||
$page_match = match_page($key, $current_entry);
|
||||
|
||||
if(sizeof($entry_match) > 0) {
|
||||
$current_entry = $entry_match[1];
|
||||
if($opened_div)
|
||||
echo('</div>');
|
||||
|
||||
echo("<br><a href='#$current_entry' class='entry-bookmark glyphicon glyphicon-bookmark' title='Permalink'></a> <b id='$current_entry-fake'>$value</b><div class='entry-text'>");
|
||||
echo("\n");
|
||||
$opened_div = true;
|
||||
}
|
||||
|
||||
if(sizeof($page_match) > 0) {
|
||||
$page = preg_replace('/&(.)((?:[^&])+)(?:(?:&(?:0|r))|$)/', "<span class='mc-color-$1'>$2</span>", $value) . '<br>';
|
||||
$no_control = preg_replace('/&./', '', $value);
|
||||
if(strlen($no_control) > 50) {
|
||||
echo($page);
|
||||
echo("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,11 +50,11 @@
|
||||
return $matches;
|
||||
}
|
||||
|
||||
function match_entry($line) {
|
||||
return match('botania\.entry\.(\w+)=(.+)', $line);
|
||||
function match_entry($key) {
|
||||
return match('botania\.entry\.(\w+)', $key);
|
||||
}
|
||||
|
||||
function match_page($line, $entry_name) {
|
||||
return match("botania\.page\.$entry_name\d+=(.+)", $line);
|
||||
function match_page($key, $entry_name) {
|
||||
return match("botania\.page\.$entry_name\d+", $key);
|
||||
}
|
||||
?>
|
||||
Reference in new issue
Block a user