From 6f66c40036975c32062b3a9ea77720b9bb5b7763 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 22 Oct 2018 11:23:48 +0200 Subject: [PATCH] more doc --- .../blocks/tiles/TileEntityNatureAltar.java | 1 + .../compat/patchouli/PageAltar.java | 2 ++ .../compat/patchouli/PageTreeRitual.java | 2 ++ .../naturesaura/events/ClientEvents.java | 4 +++ .../en_us/categories/creating.json | 6 ++++ .../en_us/entries/collecting/altar.json | 2 +- .../en_us/entries/collecting/aura_cache.json | 16 +++++++++++ .../en_us/entries/creating/ancient_tree.json | 22 +++++++++++++++ .../en_us/entries/intro/botany.json | 16 +++++++++++ .../en_us/entries/items/eye.json | 20 +++++++++++++ .../entries/items/infused_iron_tools.json | 2 +- .../en_us/entries/practices/gold_trees.json | 28 +++++++++++++++++++ 12 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/en_us/categories/creating.json create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/collecting/aura_cache.json create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/creating/ancient_tree.json create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/intro/botany.json create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/items/eye.json create mode 100644 src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/practices/gold_trees.json diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java index 4f2c3b1b..fd15aebd 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java @@ -177,6 +177,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable { } else { if (stack.isEmpty() || !stack.isItemEqual(this.currentRecipe.input)) { this.currentRecipe = null; + this.timer = 0; } else { int req = this.currentRecipe.aura / this.currentRecipe.time; if (this.container.getStoredAura() >= req) { diff --git a/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PageAltar.java b/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PageAltar.java index 54acc03d..93936aac 100644 --- a/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PageAltar.java +++ b/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PageAltar.java @@ -3,6 +3,7 @@ package de.ellpeck.naturesaura.compat.patchouli; import de.ellpeck.naturesaura.blocks.ModBlocks; import de.ellpeck.naturesaura.recipes.AltarRecipe; import net.minecraft.client.gui.Gui; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import vazkii.patchouli.client.book.BookEntry; @@ -15,6 +16,7 @@ public class PageAltar extends PageDoubleRecipe { @Override protected void drawRecipe(AltarRecipe recipe, int recipeX, int recipeY, int mouseX, int mouseY, boolean second) { + GlStateManager.enableBlend(); this.mc.getTextureManager().bindTexture(PatchouliCompat.GUI_ELEMENTS); Gui.drawModalRectWithCustomSizedTexture(recipeX + 12, recipeY, 0, 0, 75, 44, 256, 256); diff --git a/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PageTreeRitual.java b/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PageTreeRitual.java index ea3026ba..0ea850a1 100644 --- a/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PageTreeRitual.java +++ b/src/main/java/de/ellpeck/naturesaura/compat/patchouli/PageTreeRitual.java @@ -2,6 +2,7 @@ package de.ellpeck.naturesaura.compat.patchouli; import de.ellpeck.naturesaura.recipes.TreeRitualRecipe; import net.minecraft.client.gui.Gui; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import vazkii.patchouli.client.book.BookEntry; @@ -12,6 +13,7 @@ public class PageTreeRitual extends PageDoubleRecipe { @Override protected void drawRecipe(TreeRitualRecipe recipe, int recipeX, int recipeY, int mouseX, int mouseY, boolean second) { + GlStateManager.enableBlend(); this.mc.getTextureManager().bindTexture(PatchouliCompat.GUI_ELEMENTS); Gui.drawModalRectWithCustomSizedTexture(recipeX - 13, recipeY, 0, 44, 122, 88, 256, 256); diff --git a/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java b/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java index 40f4ec47..f3efa113 100644 --- a/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java +++ b/src/main/java/de/ellpeck/naturesaura/events/ClientEvents.java @@ -132,6 +132,7 @@ public class ClientEvents { GlStateManager.scale(scale, scale, scale); mc.fontRenderer.drawString(I18n.format("info." + NaturesAura.MOD_ID + ".aura_in_area"), 3 / scale, 3 / scale, 0xBB3333, true); + GlStateManager.color(1F, 1F, 1F); GlStateManager.popMatrix(); } } @@ -168,6 +169,7 @@ public class ClientEvents { int y = res.getScaledHeight() - 8; GlStateManager.pushMatrix(); + int color = container.getAuraColor(); GlStateManager.color((color >> 16 & 255) / 255F, (color >> 8 & 255) / 255F, (color & 255) / 255F); mc.getTextureManager().bindTexture(OVERLAYS); @@ -180,6 +182,8 @@ public class ClientEvents { GlStateManager.scale(scale, scale, scale); String s = stack.getDisplayName(); mc.fontRenderer.drawString(s, (x + 80) / scale - mc.fontRenderer.getStringWidth(s), (y - 7) / scale, color, true); + + GlStateManager.color(1F, 1F, 1F); GlStateManager.popMatrix(); } } diff --git a/src/main/resources/assets/naturesaura/patchouli_books/en_us/categories/creating.json b/src/main/resources/assets/naturesaura/patchouli_books/en_us/categories/creating.json new file mode 100644 index 00000000..9021e1b8 --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/en_us/categories/creating.json @@ -0,0 +1,6 @@ +{ + "name": "Creating Aura", + "description": "The finity of $(thing)Aura$() in the world can be troubling to think about, because once it is drained, it seems like it is not restorable. That, however, is not the case: This category houses explanations for how to create $(thing)Aura$() using different techniques.", + "icon": "naturesaura:ancient_sapling", + "sortnum": 18 +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/collecting/altar.json b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/collecting/altar.json index 79035a9f..bf504c36 100644 --- a/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/collecting/altar.json +++ b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/collecting/altar.json @@ -10,7 +10,7 @@ }, { "type": "naturesaura:tree_ritual", - "text": "Creating the $(item)Natural Altar$() using the $(l:naturesaura:using/tree_ritual)Ritual of the Forest$().", + "text": "Creating the $(item)Natural Altar$() using the $(l:naturesaura:using/tree_ritual)Ritual of the Forest$()", "recipe": "naturesaura:nature_altar" } ] diff --git a/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/collecting/aura_cache.json b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/collecting/aura_cache.json new file mode 100644 index 00000000..a4747443 --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/collecting/aura_cache.json @@ -0,0 +1,16 @@ +{ + "name": "Aura Cache", + "icon": "naturesaura:aura_cache", + "category": "naturesaura:collecting", + "pages": [ + { + "type": "text", + "text": "Having a $(l:naturesaura:collecting/altar)Natural Altar$() around that stores $(thing)Aura$() is all well and good, but it would be more convenient to be able to carry it around. In that case, the $(item)Aura Cache$() will prove useful: It stores a substantial amount of $(thing)Aura$() in it so one can use it on the go. $(br)To fill the cache up, simply place it on a $(item)Natural Altar$() and wait for the $(thing)Aura$() to drain into it." + }, + { + "type": "crafting", + "text": "Creating the $(item)Aura Cache$()", + "recipe": "naturesaura:aura_cache" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/creating/ancient_tree.json b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/creating/ancient_tree.json new file mode 100644 index 00000000..f88e5197 --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/creating/ancient_tree.json @@ -0,0 +1,22 @@ +{ + "name": "Ancient Trees", + "icon": "naturesaura:ancient_leaves", + "category": "naturesaura:creating", + "priority": true, + "pages": [ + { + "type": "text", + "text": "A basic way of replenishing the $(thing)Aura$() in an area are $(item)Ancient Trees$(). Once an $(item)Ancient Sapling$() is created, it will grow like a normal tree, but its leaves will start increasing the $(thing)Aura$() levels back to normal slowly.$(br)The tree, however, does not fare well during this process: As its leaves' $(thing)Aura$() is drained into the world, the leaves start dying, leaving the tree bare if enough is drained." + }, + { + "type": "naturesaura:tree_ritual", + "text": "Creating the $(item)Ancient Sapling$() using the $(l:naturesaura:using/tree_ritual)Ritual of the Forest$()", + "recipe": "naturesaura:ancient_sapling" + }, + { + "type": "crafting", + "recipe": "naturesaura:ancient_planks", + "recipe2": "naturesaura:ancient_stick" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/intro/botany.json b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/intro/botany.json new file mode 100644 index 00000000..698f156a --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/intro/botany.json @@ -0,0 +1,16 @@ +{ + "name": "Magical Botany", + "icon": "minecraft:sapling", + "category": "naturesaura:intro", + "priority": true, + "pages": [ + { + "type": "text", + "text": "As many readers may be aware, there are several branches of $(item)Botany$(), the study of $(thing)plants$(). A lot of botanists have, in the past, focused on the magical properties of plants in the form of flowers, such as the peculiar and pure daisy.$(br)However, botany is a lot more than that, especially $(item)Magical Botany$(), because not only are there more things to be discovered in nature than" + }, + { + "type": "text", + "text": "just flowers, but there are also most likely more powerful things that the world hasn't learned about yet.$(br)When becoming a botanist and studying the influences of trees, flowers and the like, one will stumble upon natural mechanics that seem familiar, yet are, at their core, entirely different. Studying and understanding these is the goal of magical botany." + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/items/eye.json b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/items/eye.json new file mode 100644 index 00000000..a692a2c1 --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/items/eye.json @@ -0,0 +1,20 @@ +{ + "name": "Environmental Eye", + "icon": "naturesaura:eye", + "category": "naturesaura:items", + "pages": [ + { + "type": "text", + "text": "When working with $(thing)Aura$(), by nature, it will be hard to grasp just how much there is in any given area or storage device. The $(item)Environmental Eye$() has the powers to display this information to botanists though: Once created, merely holding it in your hand will display several pieces of information:" + }, + { + "type": "text", + "text": "A bar will display the amount stored in $(thing)Aura$()-bearing blocks, with a full bar meaning that the block has reached its storage capacity.$(br)An additional bar will display the saturation of $(thing)Aura$() around one's current location, with the bar being half full meaning that the $(thing)Aura$() is at its expected default level. The eye's limited power, however, means that, when $(thing)Aura$() exceeds any end of the visible bar, it will not be able to tell you just how much there is." + }, + { + "type": "naturesaura:tree_ritual", + "text": "Creating the $(item)Environmental Eye$() using the $(l:naturesaura:using/tree_ritual)Ritual of the Forest$()", + "recipe": "naturesaura:eye" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/items/infused_iron_tools.json b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/items/infused_iron_tools.json index 3a27b182..8c7ddac7 100644 --- a/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/items/infused_iron_tools.json +++ b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/items/infused_iron_tools.json @@ -5,7 +5,7 @@ "pages": [ { "type": "text", - "text": "Using the inherent powers of $(l:naturesaura:items/infused_iron)Infused Iron$(), one can produce tools that not only have similar properties to its base material $(item)Iron$(), but also have additional features that one wouldn't quite expect.$(br)The following pages will display how to create the tools and how to use their special features." + "text": "Using the inherent powers of $(l:naturesaura:using/altar)Infused Iron$(), one can produce tools that not only have similar properties to its base material $(item)Iron$(), but also have additional features that one wouldn't quite expect.$(br)The following pages will display how to create the tools and how to use their special features." }, { "type": "text", diff --git a/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/practices/gold_trees.json b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/practices/gold_trees.json new file mode 100644 index 00000000..91d6088f --- /dev/null +++ b/src/main/resources/assets/naturesaura/patchouli_books/en_us/entries/practices/gold_trees.json @@ -0,0 +1,28 @@ +{ + "name": "Brilliant Trees", + "icon": "naturesaura:gold_leaf", + "category": "naturesaura:practices", + "priority": true, + "pages": [ + { + "type": "text", + "text": "Through the years that botanist's have been trying to figure out the magical properties of $(thing)Aura$() bearing objects, they have discovered an unexpected, yet common, theme: $(item)Gold$() seems to always play a role in the interaction between humans and $(thing)Aura$()." + }, + { + "type": "spotlight", + "text": "To get into first contact with the substance's powers, one is required to create a $(item)Brilliant Tree$() that will, when harvested, shed $(item)Gold Leaf$() - a delicate, yet powerful material. To create such a tree, simply craft a bit of $(item)Brilliant Fiber$() and place it into the crown of a tree. Time will then bring brilliance.", + "item": "naturesaura:gold_leaf", + "link_recipe": true + }, + { + "type": "crafting", + "text": "Creating the $(item)Brilliant Fiber$()", + "recipe": "naturesaura:gold_fiber" + }, + { + "type": "crafting", + "text": "$(item)Gold Leaf$(), once harvested, can easily be crushed into $(item)Gold Powder$() which can be placed on the ground as an integral part of the $(l:naturesaura:using/tree_ritual)Ritual of the Forest$().", + "recipe": "naturesaura:gold_powder" + } + ] +} \ No newline at end of file