first progress on book integration, need to introduce a custom json structure

This commit is contained in:
2016-12-25 23:16:58 +01:00
parent 176e39f5e6
commit ac15fd9da1
8 changed files with 36 additions and 2 deletions

View File

@@ -70,6 +70,7 @@ public class TAIGA {
@EventHandler
public void postInit(FMLPostInitializationEvent e) {
proxy.registerBookPages();
}
@EventHandler
@@ -124,7 +125,5 @@ public class TAIGA {
integrateOre("Karmesine", karmesineFluid);
integrateOre("Ovium", oviumFluid);
integrateOre("Jauxum", jauxumFluid);
}
}

View File

@@ -16,6 +16,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fluids.Fluid;
import slimeknights.mantle.client.book.repository.FileRepository;
import slimeknights.tconstruct.library.book.TinkerBook;
import slimeknights.tconstruct.library.client.MaterialRenderInfo;
import slimeknights.tconstruct.library.client.texture.MetalTextureTexture;
import slimeknights.tconstruct.library.materials.Material;
@@ -122,6 +124,11 @@ public class ClientProxy extends CommonProxy {
TAIGAConfiguration.clientPreInit();
}
@Override
public void registerBookPages() {
TinkerBook.INSTANCE.addRepository(new FileRepository("taiga:book"));
}
public static class FluidStateMapper extends StateMapperBase implements ItemMeshDefinition {
public final Fluid fluid;

View File

@@ -24,4 +24,7 @@ public class CommonProxy {
public void registerServerCommands(FMLServerStartingEvent e) {
}
public void registerBookPages() {
}
}

View File

@@ -0,0 +1,8 @@
{
"title": "TEST Title",
"text": [
{
"text": "Test text."
}
]
}

View File

@@ -0,0 +1 @@
index_title=TAIGA

View File

@@ -0,0 +1,9 @@
[
{
"name": "index_title",
"data": "sections/intro.json",
"icon": {
"file": "taiga:textures/gui/book/logo.png"
}
}
]

View File

@@ -0,0 +1,7 @@
[
{
"name": "welcome",
"type": "text",
"data": "intro/welcome.json"
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB