Hmm, I checked the source of both of the above. Tinkers Construct definitely uses an XML format book, not sure about openblocks, but it doesn't look like the source I looked at uses Enchiridion 2.
You only have to find the correct event to put it in...
Ok, thanks for trying to help, but to see what actually needed to be done, read below
So I finally did get this API added to Draco Animus. We should have a book that you can read while playing the mod in the next release coming up in a week or two. This tutorial was invaluable:
I did find a "bug" in this function: "registerModInDev", where it was expecting a certain folder for how your mod stores assets. It didn't find the correct folder for my mod, but may work for most. So most of the code I had to add dealt with fixing that "bug".
It took me hours to figure out how to put the book I created (just a blank one so far) into the player inventory when they first spawn into a new world. I looked, but could find no examples I could use. So hopefully my code will help anyone that does this.
A few other files to look at to understand how this works (besides the tutorial), are:
You can also do "ModId:AssetsPathName" where I have "Mariculture".
Maybe I missed some information you provide somewhere, but I created my own instance of the API, because I found no documentation with your mod on how to register a book. I did find the tutorial I mentioned above though, and it explained how to use an API, so that is what I did.
You do realize that when you say use this:
/** Register this mod as containing books **/
FMLInterModComms.sendMessage("Enchiridion2", "registerBookMod", "Mariculture");
registerBookItem("processing", GuideMeta.PROCESSING);
That the registerBookItem is actually a function in mariculture, that looks like this:
public static void registerBookItem(String name, int meta) {
NBTTagCompound tag = new NBTTagCompound();
tag.setString("book", "mariculture_" + name);
new ItemStack(guides, 1, meta).writeToNBT(tag);
FMLInterModComms.sendMessage("Enchiridion2", "registerBookItem", tag);
}
It also has no documentation (like javadoc) to say how to use it either. I did try and use it, but it then requires another class named ItemGuide, and that class needed more stuff, it seemed to go on and on, so at some point (after at least an hour), I gave up trying to figure out how Mariculture did it. It doesn't look like a simple example. I think the way I did it is probably easier to follow for someone familiar with how to use an API. So I did previously try to use the code you mention as an example, but I couldn't get it to work.
I admit this is the first time I've added any support for another mod in a way such that the other mod is optional. I did experiment with adding some of the fish from Mariculture to Draco Animus, but it wasn't done such that it was optional, it was required. Also I was a little disappointed that none of the fish are food.
BTW, I think I would have still run into the bug with registerModBooks function too, which I can only work around if I use the API.
Well, I have no idea how you are supposed to do it. I couldn't find a wiki, although there is the online wiki, in the form of a book, when you press, I think H.
In the enchiridion.cfg there is this:
# Enabling this will spawn you in the world with a Book Binder
B:"Preloaded Binder > Enable"=false
Try setting that to true and see what happens. (Edit: I think that is not for enchiridion 2, so would probably not be what you want).
Enchiridion 2 - 2.0d[/b]
• Add check for invalid characters in page names (Only allow Alphanumeric characters, no spaces (no need it's an unlocalized name));
• Require at least one letter/number in page names
• Disable Autodiscovery by default
• Fix deleting a wiki page... Deleting too much on some systems (Well kinda fixed).
• ^ Must enable deleting pages in the config
So maybe you need to go into the config and enable deleting pages?
I'm curious if anybody else has needed to do this and figured out how.
I wrote a custom book and made sure it was saved on a server on which I was an admin. I'd like to use the book on another server, and I have access to the world files from both. I've copied over my /world/books folder, which has the correct .JSON and .dat files saved...
How do I go about crafting or spawning in a version of this book on the new server?
( It doesn't show up in Enchiridion 2's Creative Tab. )
I've got a book. I figured out how to add it to my mod and get it to open. But the book contains images, saved in a folder with the book. Where do I put those images in my mod?
I seems to be looking in:
config/enchiridion/books/images/Draco_Animus for the images, but do I have to write code to copy all of them there from the mod jar file?
Has anybody managed to find a way to give a player a book on spawn? I was thinking of using Accidentally Circumstantial Events to give my players a book on spawn, but that requires the item name in the form "modid.itemname,metavalue" but looking in NEI, all the books have the same ID number.
Does anybody know how you could go about finding the actual item name of a book in order to spawn one into the game using the /give command?
I did manage to get a book to spawn. Look back through the previous posts, I posted a link to my code, although the author of this mod said there is an easier way than how I did it, although he didn't include any instructions on how that works that I could find.
I'm not including the book at the moment though, as after making a book (one of my testers made it), we realized that if you add pictures other than textures already in the mod, you will then need to include those images somewhere (not sure where), so we are still kind of stuck trying to figure out how this whole thing is supposed to be done.
Can you show me a screenshot, because unless you play minecraft in that tiny window it starts in, or your res is less than 1024xblah, it should fit.
Actually, I play in the normal window (854x480) on the normal/size 2 gui, and everything else fits into that. I am not going to require the people I play with to use a larger window, and since I record for YouTube's 854x480 player window, I like the sharpness that comes from not having things resized and made blurry.
So yea, a fixed width of over 1000 pixels is too wide.
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
I'm trying to make my custom book show in the Wiki (in-game) and this is the code i'm using. But when I use this the game crash when loading my world.
If I use "Enchiridion2:book 0" alone the game will load the "Create a New Book" book instead of my customized book.
I'm gonna try to use a variable instead but I was wondering if anyone figured the right way to do this yet...
Here's an item dump from my Inventory using NEI for reference if you wanna help me.
Hmm, I checked the source of both of the above. Tinkers Construct definitely uses an XML format book, not sure about openblocks, but it doesn't look like the source I looked at uses Enchiridion 2.
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
Ok, thanks for trying to help, but to see what actually needed to be done, read below
So I finally did get this API added to Draco Animus. We should have a book that you can read while playing the mod in the next release coming up in a week or two. This tutorial was invaluable:
http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571434-tutorial-modding-with-apis
Most of the code needed to make this work (for me) is in this folder if you want to see it:
https://github.com/DracoAnimus/Coding/tree/master/src/main/java/net/wildbill22/draco/api
I did find a "bug" in this function: "registerModInDev", where it was expecting a certain folder for how your mod stores assets. It didn't find the correct folder for my mod, but may work for most. So most of the code I had to add dealt with fixing that "bug".
It took me hours to figure out how to put the book I created (just a blank one so far) into the player inventory when they first spawn into a new world. I looked, but could find no examples I could use. So hopefully my code will help anyone that does this.
A few other files to look at to understand how this works (besides the tutorial), are:
lib/REFERENCE.java
Core.java - this is the main mod file
build.gradle
mcmod.info
Any comments on how I did this are welcome
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
^ I'm wondering, if you're just trying to register one of the books, why you are creating your own instance of the API :S.
Here's what I do in Mariculture:
https://github.com/joshiejack/Mariculture/blob/1.7.10-1.3.0/src/main/java/mariculture/plugins/PluginEnchiridion.java#L102
You can also do "ModId:AssetsPathName" where I have "Mariculture".
Maybe I missed some information you provide somewhere, but I created my own instance of the API, because I found no documentation with your mod on how to register a book. I did find the tutorial I mentioned above though, and it explained how to use an API, so that is what I did.
You do realize that when you say use this:
/** Register this mod as containing books **/
FMLInterModComms.sendMessage("Enchiridion2", "registerBookMod", "Mariculture");
registerBookItem("processing", GuideMeta.PROCESSING);
That the registerBookItem is actually a function in mariculture, that looks like this:
public static void registerBookItem(String name, int meta) {
NBTTagCompound tag = new NBTTagCompound();
tag.setString("book", "mariculture_" + name);
new ItemStack(guides, 1, meta).writeToNBT(tag);
FMLInterModComms.sendMessage("Enchiridion2", "registerBookItem", tag);
}
It also has no documentation (like javadoc) to say how to use it either. I did try and use it, but it then requires another class named ItemGuide, and that class needed more stuff, it seemed to go on and on, so at some point (after at least an hour), I gave up trying to figure out how Mariculture did it. It doesn't look like a simple example. I think the way I did it is probably easier to follow for someone familiar with how to use an API. So I did previously try to use the code you mention as an example, but I couldn't get it to work.
I admit this is the first time I've added any support for another mod in a way such that the other mod is optional. I did experiment with adding some of the fish from Mariculture to Draco Animus, but it wasn't done such that it was optional, it was required. Also I was a little disappointed that none of the fish are food.
BTW, I think I would have still run into the bug with registerModBooks function too, which I can only work around if I use the API.
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
Probably better to ask in there forum, because as far as I could tell, they did not use this mod.
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
Well, I have no idea how you are supposed to do it. I couldn't find a wiki, although there is the online wiki, in the form of a book, when you press, I think H.
In the enchiridion.cfg there is this:
# Enabling this will spawn you in the world with a Book Binder
B:"Preloaded Binder > Enable"=false
Try setting that to true and see what happens. (Edit: I think that is not for enchiridion 2, so would probably not be what you want).
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
Hey how do I delete pages from the book?
I found this in this thread, seems like a clue:
Enchiridion 2 - 2.0d[/b]
• Add check for invalid characters in page names (Only allow Alphanumeric characters, no spaces (no need it's an unlocalized name));
• Require at least one letter/number in page names
• Disable Autodiscovery by default
• Fix deleting a wiki page... Deleting too much on some systems (Well kinda fixed).
• ^ Must enable deleting pages in the config
So maybe you need to go into the config and enable deleting pages?
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
I'm curious if anybody else has needed to do this and figured out how.
I wrote a custom book and made sure it was saved on a server on which I was an admin. I'd like to use the book on another server, and I have access to the world files from both. I've copied over my /world/books folder, which has the correct .JSON and .dat files saved...
How do I go about crafting or spawning in a version of this book on the new server?
( It doesn't show up in Enchiridion 2's Creative Tab. )
I've got a book. I figured out how to add it to my mod and get it to open. But the book contains images, saved in a folder with the book. Where do I put those images in my mod?
I seems to be looking in:
config/enchiridion/books/images/Draco_Animus for the images, but do I have to write code to copy all of them there from the mod jar file?
Thanks.
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
Has anybody managed to find a way to give a player a book on spawn? I was thinking of using Accidentally Circumstantial Events to give my players a book on spawn, but that requires the item name in the form "modid.itemname,metavalue" but looking in NEI, all the books have the same ID number.
Does anybody know how you could go about finding the actual item name of a book in order to spawn one into the game using the /give command?
I did manage to get a book to spawn. Look back through the previous posts, I posted a link to my code, although the author of this mod said there is an easier way than how I did it, although he didn't include any instructions on how that works that I could find.
I'm not including the book at the moment though, as after making a book (one of my testers made it), we realized that if you add pictures other than textures already in the mod, you will then need to include those images somewhere (not sure where), so we are still kind of stuck trying to figure out how this whole thing is supposed to be done.
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
Is this a client only mod or does the server need this also?
Any way to scroll or make the book editing screen smaller? Running windows fill screen with 1600x900 resolution.
Actually, I play in the normal window (854x480) on the normal/size 2 gui, and everything else fits into that. I am not going to require the people I play with to use a larger window, and since I record for YouTube's 854x480 player window, I like the sharpness that comes from not having things resized and made blurry.
So yea, a fixed width of over 1000 pixels is too wide.
* Promoting this week: Captive Minecraft 4, Winter Realm. Aka: Vertical Vanilla Viewing. Clicky!
* My channel with Mystcraft, and general Minecraft Let's Plays: http://www.youtube.com/user/Keybounce.
* See all my video series: http://www.minecraftforum.net/forums/minecraft-editions/minecraft-editions-show-your/2865421-keybounces-list-of-creation-threads
(In regard to a mod that gives realistic animal genetics):
Would you really rather have bees that make diamonds and oil with magical genetic blocks?
... did I really ask that?
Not sure if someone answered you, but you have to manually do it by editing the book file.
Won't work in-game as far as I know.
Colored Lights for Minecraft! Link Removed
Ever wanted to be a blacksmith?
{
"mod": "Enchiridion2",
"stack": "Enchiridion2:book 0 {identifier:""Mo_Creatures_Guide""}",
"type": "network",
"free": true,
"onCrafted": false,
"openGuiClass": "",
"openGuiNBT": "",
"pickUp": false,
"overwrite": ""
},
I'm trying to make my custom book show in the Wiki (in-game) and this is the code i'm using. But when I use this the game crash when loading my world.
If I use "Enchiridion2:book 0" alone the game will load the "Create a New Book" book instead of my customized book.
I'm gonna try to use a variable instead but I was wondering if anyone figured the right way to do this yet...
Here's an item dump from my Inventory using NEI for reference if you wanna help me.
Slot,Display Name,Amount,Damage,Max Damage,Item ID,Unlocalized Name,Item Class,NBT
0,§6Mo'Creatures Encyclopedia,1,0,0,Enchiridion2:book,item.book,joshie.enchiridion.designer.ItemBook,"{identifier:""Mo_Creatures_Guide""}"
It give all the info I should need to make the book appear under the Library in the Wikipedia.
But I have not yet found the proper way to do it.
What do the "type" variables do?
I know there's network, default and switch but I have no clues what they even used for.
Here's the config I used to try to attempt to make the book show in Library
{
"mod": "Botania",
"stack": "Botania:lexicon 0 {knowledge.minecraft:1b,knowledge.alfheim:1b}",
"type": "network",
"free": false,
"onCrafted": false,
"openGuiClass": "vazkii.botania.client.gui.lexicon.GuiLexiconIndex",
"openGuiNBT": "knowledge.alfheim",
"pickUp": false,
"overwrite": "Botania:lexicon 0"
},
I thought {knowledge.minecraft:1b,knowledge.alfheim:1b} where NBT tags but apparently not, or maybe I'm just not using the NBT correctly...
Any helps is really appreciated, I'm still an apprentice at this.
EDIT: Updated Inventory dumb from NEI (Full Screen for most aproximate format, Minecraft forum... limited!)
Slot,Display Name,Amount,Damage,Max Damage,Item ID,Unlocalized Name,Item Class,NBT (in that order)
0,§6Mo'Creatures Encyclopedia,1,0,0,Enchiridion2:book,item.book,joshie.enchiridion.designer.ItemBook,"{identifier:""Mo_Creatures_Guide""}"
1,World Domination with OpenBlocks,1,0,0,OpenBlocks:infoBook,item.openblocks.info_book,openblocks.common.item.ItemInfoBook,
2,Materials and You: Volume 1,1,0,0,TConstruct:manualBook,item.tconstruct.manual.beginner,tconstruct.tools.items.Manual,
3,Materials and You: Volume 2,1,1,0,TConstruct:manualBook,item.tconstruct.manual.toolstation,tconstruct.tools.items.Manual,
4,Mighty Smelting,1,2,0,TConstruct:manualBook,item.tconstruct.manual.smeltery,tconstruct.tools.items.Manual,
5,Diary of a Tinker,1,3,0,TConstruct:manualBook,item.tconstruct.manual.diary,tconstruct.tools.items.Manual,
6,Tinkers' Weaponry,1,4,0,TConstruct:manualBook,item.tconstruct.manual.weaponry,tconstruct.tools.items.Manual,
7,Enchanted Book,1,0,0,minecraft:enchanted_book,item.enchantedBook,net.minecraft.item.ItemEnchantedBook,{}
8,Introduction Book,1,0,0,Enchiridion2:book,item.book,joshie.enchiridion.designer.ItemBook,"{identifier:""enchiridion.introbook""}"
9,Create New Book,1,0,0,Enchiridion2:book,item.book,joshie.enchiridion.designer.ItemBook,
10,Mantle:item.mantle.manual.test.name,1,0,0,Mantle:mantleBook,Mantle:item.mantle.manual.test,mantle.items.Manual,
Colored Lights for Minecraft! Link Removed
Ever wanted to be a blacksmith?
Can I use this in a modpack
Obviously...
Colored Lights for Minecraft! Link Removed
Ever wanted to be a blacksmith?
where does it say?