Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions src/generated/resources/assets/thavma/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"item.thavma.basic_amulet": "Basic Amulet",
"item.thavma.basic_belt": "Basic Belt",
"item.thavma.basic_ring": "Basic Ring",
"item.thavma.book": "Elements of Thavma",
"item.thavma.book": "Elements",
"item.thavma.charm_of_the_dawn": "Charm of the Dawn",
"item.thavma.eye_of_warden": "Eye of Warden",
"item.thavma.fabric": "Infused Fabric",
Expand Down Expand Up @@ -169,15 +169,16 @@
"research/category.thavma.thavma": "Thavma",
"research/entry.thavma.alchemy.alchemy": "Alchemy",
"research/entry.thavma.story.story1": "A Courtesy Call",
"research/entry.thavma.story.story1.page0.paragraph0": "Lorem ipsum %s 1 sit amet,",
"research/entry.thavma.story.story1.page0.paragraph1": "this story a great meaning haveth.",
"research/entry.thavma.story.story1.page0.title": "A Courtesy Call 1",
"research/entry.thavma.story.story1.page1.paragraph0": "Lorem dolor 2 sit amet,",
"research/entry.thavma.story.story1.page1.paragraph1": "this story a great meaning haveth.",
"research/entry.thavma.story.story1.page1.title": "A Courtesy Call 2",
"research/entry.thavma.story.story1.page2.paragraph0": "Lorem lotrumatum dolor 3 sit amet,",
"research/entry.thavma.story.story1.page2.paragraph1": "this story a great meaning haveth.",
"research/entry.thavma.story.story1.page2.title": "A Courtesy Call 3",
"research/entry.thavma.story.story1.figure_feature0": "What follows is generic lorem ipsum so the text looks natural. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dapibus mattis lectus, quis aliquet ex. In hac habitasse platea dictumst. Praesent dignissim urna at feugiat pulvinar. Suspendisse laoreet lorem ut velit venenatis gravida. Donec posuere diam est, ac malesuada libero fermentum sed. Phasellus ac cursus nibh, eget pharetra leo. Maecenas scelerisque velit massa, sit amet tincidunt nulla dictum non. Sed egestas congue bibendum. Aenean facilisis nunc vitae purus tincidunt, sit amet dignissim libero gravida. Mauris vel tortor elit. Curabitur sit amet nisi sagittis, ullamcorper diam sed, condimentum est. Etiam blandit ac magna sit amet luctus. Duis nec mi tincidunt nunc.",
"research/entry.thavma.story.story1.paragraph_feature0": "This is a sample paragraph that does not start a page.",
"research/entry.thavma.story.story1.paragraph_feature1": "Another paragraph just to make the content on the page stretch out a little longer. Possible double trimIndent() in the LanguageProvider does not cause any trouble. ",
"research/entry.thavma.story.story1.paragraph_feature2": "This paragraph should start a new page always. It has the mustStartPage property set to true.",
"research/entry.thavma.story.story1.paragraph_feature3": "Just another random little paragraph :D",
"research/entry.thavma.story.story1.paragraph_feature4": "This paragraph is inserted into the middle without it being an image caption (pre-set page number)",
"research/entry.thavma.story.story1.title_feature0": "A courtesy call starts the page",
"research/entry.thavma.story.story1.title_feature1": "This title might appear in the middle",
"research/entry.thavma.story.story1.title_feature2": "(start of page)",
"research/entry.thavma.story.story1.title_feature3": "This is page number 1!",
"research/entry.thavma.thavma.alchemy": "Alchemy",
"research/entry.thavma.thavma.arcane_lens": "The Arcane Lens",
"research/entry.thavma.thavma.arcane_lens.page0.paragraph0": "The part of the book I can read describes an arcane tool that \"allows the user to see\", whatever that might mean. I have a feeling that crafting it could assist my work in unsealing the other pages.",
Expand All @@ -191,7 +192,7 @@
"research/entry.thavma.thavma.technology": "Technology",
"research/entry.thavma.thavma.thavma": "Thavma",
"research/entry.thavma.thavma.thavma.page0.paragraph0": "I was merely toying with that wand -if it can even be called that- when this tome flew into my hands! I can sense great power within it.",
"research/entry.thavma.thavma.thavma.page0.paragraph1": "The cover reads \"Elements of Thavma\", but a lot of its pages appear blank, sealed by some magic.",
"research/entry.thavma.thavma.thavma.page0.paragraph1": "The cover reads \"Elements\", but a lot of its pages appear blank, sealed by some magic.",
"research/entry.thavma.thavma.thavma.page0.paragraph2": "To read them, I will first need to break that seal. It won't be easy... but I have a feeling it will be worth my efforts.",
"research/entry.thavma.thavma.thavma.page0.title": "Thavma",
"research/entry.thavma.thavma.thavma.page1.paragraph0": "I will document all my findings inside the book, so that I can recall them later.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"count": 1,
"id": "thavma:crucible"
},
"pages": [],
"pageFeatures": [],
"position": [
0,
0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,104 @@
"count": 1,
"id": "minecraft:turtle_helmet"
},
"pages": [
"pageFeatures": [
{
"type": "thavma:text",
"paragraphs": [
{
"translate": "research/entry.thavma.story.story1.page0.paragraph0"
},
{
"translate": "research/entry.thavma.story.story1.page0.paragraph1"
}
],
"title": {
"type": "thavma:title",
"starts_page": true,
"text": {
"bold": true,
"translate": "research/entry.thavma.story.story1.page0.title"
"translate": "research/entry.thavma.story.story1.title_feature0"
}
},
{
"type": "thavma:text",
"paragraphs": [
{
"translate": "research/entry.thavma.story.story1.page1.paragraph0"
},
{
"translate": "research/entry.thavma.story.story1.page1.paragraph1"
}
],
"title": {
"type": "thavma:paragraph",
"text": {
"translate": "research/entry.thavma.story.story1.paragraph_feature0"
}
},
{
"type": "thavma:paragraph",
"text": {
"translate": "research/entry.thavma.story.story1.paragraph_feature1"
}
},
{
"type": "thavma:figure",
"caption": {
"color": "dark_aqua",
"italic": true,
"translate": "research/entry.thavma.story.story1.figure_feature0"
},
"image": {
"canvas_height": 101,
"canvas_width": 180,
"height": 101,
"location": "thavma:textures/gui/images/haybales.png",
"width": 180
}
},
{
"type": "thavma:title",
"text": {
"bold": true,
"translate": "research/entry.thavma.story.story1.title_feature1"
}
},
{
"type": "thavma:paragraph",
"starts_page": true,
"text": {
"translate": "research/entry.thavma.story.story1.paragraph_feature2"
}
},
{
"type": "thavma:title",
"starts_page": true,
"text": {
"bold": true,
"translate": "research/entry.thavma.story.story1.page1.title"
"translate": "research/entry.thavma.story.story1.title_feature2"
}
},
{
"type": "thavma:text",
"paragraphs": [
{
"translate": "research/entry.thavma.story.story1.page2.paragraph0"
},
{
"translate": "research/entry.thavma.story.story1.page2.paragraph1"
}
],
"title": {
"type": "thavma:title",
"has_set_page": true,
"preferred_page": 0,
"starts_page": true,
"text": {
"bold": true,
"translate": "research/entry.thavma.story.story1.page2.title"
"translate": "research/entry.thavma.story.story1.title_feature3"
}
},
{
"type": "thavma:paragraph",
"text": {
"translate": "research/entry.thavma.story.story1.paragraph_feature3"
}
},
{
"type": "thavma:figure",
"has_set_page": true,
"image": {
"canvas_height": 77,
"canvas_width": 87,
"height": 77,
"location": "thavma:textures/gui/images/smileyface.png",
"width": 87
},
"preferred_page": 5
},
{
"type": "thavma:paragraph",
"has_set_page": true,
"preferred_page": 5,
"text": {
"translate": "research/entry.thavma.story.story1.paragraph_feature4"
}
}
],
"position": [
0,
-3
0
],
"preferX": false,
"title": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"count": 1,
"id": "thavma:crucible"
},
"pages": [],
"pageFeatures": [],
"position": [
-2,
2
Expand Down

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like you deleted content here

Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,7 @@
"count": 1,
"id": "thavma:arcane_lens"
},
"pages": [
{
"type": "thavma:text",
"paragraphs": [
{
"translate": "research/entry.thavma.thavma.arcane_lens.page0.paragraph0"
},
{
"translate": "research/entry.thavma.thavma.arcane_lens.page0.paragraph1"
},
{
"translate": "research/entry.thavma.thavma.arcane_lens.page0.paragraph2"
}
],
"title": {
"bold": true,
"translate": "research/entry.thavma.thavma.arcane_lens.page0.title"
}
}
],
"pageFeatures": [],
"position": [
2,
-2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"count": 1,
"id": "thavma:infusion_matrix"
},
"pages": [],
"pageFeatures": [],
"position": [
2,
2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"count": 1,
"id": "thavma:aqua_shard"
},
"pages": [],
"pageFeatures": [],
"position": [
2,
-4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"count": 1,
"id": "thavma:research_table"
},
"pages": [],
"pageFeatures": [],
"position": [
-1,
-1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@
"count": 1,
"id": "thavma:research_table"
},
"pages": [
{
"type": "thavma:crafting",
"recipeRL": "minecraft:chest"
}
],
"pageFeatures": [],
"position": [
0,
0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"count": 1,
"id": "thavma:goggles"
},
"pages": [],
"pageFeatures": [],
"position": [
2,
4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,7 @@
"count": 1,
"id": "thavma:book"
},
"pages": [
{
"type": "thavma:text",
"paragraphs": [
{
"translate": "research/entry.thavma.thavma.thavma.page0.paragraph0"
},
{
"translate": "research/entry.thavma.thavma.thavma.page0.paragraph1"
},
{
"translate": "research/entry.thavma.thavma.thavma.page0.paragraph2"
}
],
"title": {
"bold": true,
"translate": "research/entry.thavma.thavma.thavma.page0.title"
}
},
{
"type": "thavma:text",
"paragraphs": [
{
"translate": "research/entry.thavma.thavma.thavma.page1.paragraph0"
}
]
}
],
"pageFeatures": [],
"position": [
0,
-6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"count": 1,
"id": "thavma:greatwood_log"
},
"pages": [],
"pageFeatures": [],
"position": [
0,
-3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"count": 1,
"id": "thavma:thavmite_silverwood_wand"
},
"pages": [],
"pageFeatures": [],
"position": [
-2,
4
Expand Down
1 change: 1 addition & 0 deletions src/main/java/me/alegian/thavma/impl/Thavma.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ object Thavma {
T7Attributes.REGISTRAR.register(KFF_MOD_BUS)
T7GlobalLootModifierSerializers.REGISTRAR.register(KFF_MOD_BUS)
PageTypes.REGISTRAR.register(KFF_MOD_BUS)
PageFeatureTypes.REGISTRAR.register(KFF_MOD_BUS)
T7Features.REGISTRAR.register(KFF_MOD_BUS)

registerCommonModEvents()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package me.alegian.thavma.impl.client.event

import me.alegian.thavma.impl.client.gui.book.PAGE_FEATURE_RENDERERS
import me.alegian.thavma.impl.client.gui.book.PageFeatureRenderer
import me.alegian.thavma.impl.common.book.PageFeature
import me.alegian.thavma.impl.common.book.PageFeatureType
import net.neoforged.bus.api.Event
import net.neoforged.fml.event.IModBusEvent

class RegisterPageFeatureRenderersEvent : Event(), IModBusEvent {
fun <T : PageFeature> register(pageFeatureType: PageFeatureType<T>, pageFeatureRenderer: PageFeatureRenderer<T>) {
PAGE_FEATURE_RENDERERS[pageFeatureType] = pageFeatureRenderer
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import net.neoforged.bus.api.Event
import net.neoforged.fml.event.IModBusEvent

class RegisterPageRenderersEvent : Event(), IModBusEvent {
fun <T: Page> register(pageType:PageType<T>, pageRenderer: PageRenderer<T>) {
fun <T : Page> register(pageType: PageType<T>, pageRenderer: PageRenderer<T>) {
PAGE_RENDERERS[pageType] = pageRenderer
}
}
Loading