This is the thread for developing plugins for my Link Removed. Any explanations, tutorials, tips and discussions will go in this thread. I created this to shift plugin development questions and answers away from the main thread.
Source Code
All the source code for SimpleCore API and the official plugins (SimpleOres 2, Fusion, Netherrocks), can be found at the SimpleCore API GitHub.
Javadoc
There is also a Javadoc available for SimpleCore API (it also includes the classes used in SimpleOres 2, Fusion and Netherrock). It is also on the GitHub. The latest javadoc is: Latest SimpleCore API Javadoc.
.
.
Using the API
Because the forum editor is just horrible, all the tutorials are on the GitHub. You can find them at the Using The API wiki page.
I may re-do Arsenic like this. Oh, and the line: "The "morefusions" string should be the ModID of your plugin."
You may want to re-phrase that, as it could be read: "The string, here called 'morefusions', should be named your ModID", or "The ModID of your plugin should be 'morefusions'."
I may re-do Arsenic like this. Oh, and the line: "The "morefusions" string should be the ModID of your plugin."
You may want to re-phrase that, as it could be read: "The string, here called 'morefusions', should be named your ModID", or "The ModID of your plugin should be 'morefusions'."
I may re-do Arsenic like this. Oh, and the line: "The "morefusions" string should be the ModID of your plugin."
You may want to re-phrase that, as it could be read: "The string, here called 'morefusions', should be named your ModID", or "The ModID of your plugin should be 'morefusions'."
Fixed it I'll get more up, I ran out of time when I started the items one
I've just "moved" the Simple Recycling and Clay & Cobble to the fusion directory, and I'm about to dive back into the recycling recipes. I've only done a bit with Arsenic, but I will see if I can move it to the FF folder as well.
about the chunks. I'm going to implement it in Arsenic. I think mixing chunks as a form of compounding would be a good alternative to Fusion Forge and Smelting.
The recipe pattern I'm planning on using, if others would be interested is:
FROM TO 3 medium 1 large 5 small 1 large 2 medium + 2 small 1 large --- --- 3 small 1 medium --- --- 1 large 2 medium --- --- 1 medium 2 small
It is always most efficient to go as directly to the large chunk as possible. Changing chunk size is also inefficient. However, chunks can be added to various treasures (zombies will very rarely drop arsenic stuff), so this is a way to incorporate stray pieces, or get a chunk size you need for a compounding recipe.
Your old files for, say blocks, was SimpleOresBlocks.copperOre.
Now, you named the file "Blocks.java", and Blocks.copperOre tries to resolve to the core blocks file. I'm working on this, but may need suggestions.
FusionRecipes.smelting().addSmelting(new ItemStack(SimpleOres.core.Armor.copperHelm), new ItemStack(Block.gravel), new ItemStack(Item.coal), new ItemStack(SimpleOres.core.Blocks.copperOre), 10.0F);
Seems to work.
Edit: It does work. I've just (1) learned the mass-comment command, and (2) tested a few of the copper and tin recipes.
Your old files for, say blocks, was SimpleOresBlocks.copperOre.
Now, you named the file "Blocks.java", and Blocks.copperOre tries to resolve to the core blocks file. I'm working on this, but may need suggestions.
FusionRecipes.smelting().addSmelting(new ItemStack(SimpleOres.core.Armor.copperHelm), new ItemStack(Block.gravel), new ItemStack(Item.coal), new ItemStack(SimpleOres.core.Blocks.copperOre), 10.0F);
Seems to work
I find a good way to do it is to import SimpleOres.core.Blocks and call it something like coreBlocks.
For example:
import SimpleOres.core.Blocks;
import SimpleOres.core.Items;
public class Content
{
public static Blocks coreBlocks;
public static Items coreItems;
FusionRecipes.smelting().addSmelting(new ItemStack(coreItems.copperHelm), new ItemStack(Block.gravel), new ItemStack(Item.coal), new ItemStack(coreBlocks.copperOre), 10.0F);
}
I find a good way to do it is to import SimpleOres.core.Blocks and call it something like coreBlocks.
I actually tried that. (Yes, I seem to be slowly gathering skills.)The problem is, when I set "blocks" to "soblocks" (as I used), there are two "blocks" files. I tried setting soblocks to the full Simple Ores blocks file path, but I may have done something wrong.
Let me try one more time. If there is a change to the structure, it would be easy to change a variable.
Edit: Alas, yes, you are right. I must have mistyped something. I just smelted a copper and tin hoe. (Note: I set the variable to the entire path. "soTools" is "SimpleOres.core.Tools".)
Edit: The great <ctrl>C<ctrl>V frenzy is done... I have to take a break, then test in Eclipse, then add the new recycle set.
These two imports cause a "collision" error. Does Java not like importing two files of the same name?
Edit: tried this:
import SimpleOres.plugins.fusion.moreFusions.*;
...
public static SimpleOres.plugins.fusion.moreFusions.Content moreAlloy;
And Minecraft made a rather nasty splat. Unless I'm missing something, I may have to make a mini-mod-mod for the new alloy, and it can cause issues with people wanting to alloy it to any of the core alloys. If the new one was going to be an optional plug-in, having a separate file is probably preferable.
These two imports cause a "collision" error. Does Java not like importing two files of the same name?
Edit: tried this:
import SimpleOres.plugins.fusion.moreFusions.*;
...
public static SimpleOres.plugins.fusion.moreFusions.Content moreAlloy;
And Minecraft made a rather nasty splat. Unless I'm missing something, I may have to make a mini-mod-mod for the new alloy, and it can cause issues with people wanting to alloy it to any of the core alloys. If the new one was going to be an optional plug-in, having a separate file is probably preferable.
Try
public static SimpleOres.plugins.fusion.Content fusionContent;
public static SimpleOres.plugins.fusion.moreFusions.Content moreContent;
I may need to rename classes if that doesn't work.
Also... For some reason everyone wants brass, though I don't see the advantage of having brass as opposed to bronze. You would need zinc, which is a metal that is mostly used for alloying.
I just looked up the top ten foods for zinc. Three of them are roasted wheat, roasted pumpkin seeds, and roasted watermelon seeds.
Also... For some reason everyone wants brass, though I don't see the advantage of having brass as opposed to bronze. You would need zinc, which is a metal that is mostly used for alloying.
I just looked up the top ten foods for zinc. Three of them are roasted wheat, roasted pumpkin seeds, and roasted watermelon seeds.
There is so much about modding I must learn....
What kind of things do you think you need to learn? Just curious.
What kind of things do you think you need to learn? Just curious.
The main thing is config files. I started on that, but then I've had to spend my Minecraft time the past few evenings doing a lot of cutting-and-pasting in my recipe files, and then testing. (My KVM switchbox sees <ctrl><ctrl> as a change-input command so I ended up plugging a second keyboard into my PC.) Oh, and the testing reminds me: I moved my mods to the "fusion" folder, which you requested for plug-ins so they can be more easily packaged. However, you may want to put a notice that if you do this, be sure to carefully clean out anything from the core Simple Ores mod when you zip that in your reobfusciate folder. At one point I apparently missed one of your class files, and Minecraft did a rather mighty implosion into oblivion.
That pushed any time to learn a bit too close to midnight, and at that point I just want to play 20 minutes of Minecraft and get to bed.
Anyway, the two main things now are the config files, so I can add items, and then how to break up a class file into multiple class files. In Arsenic, I have a block class and item class, and the screen shot shows they work, but as the mod grows I want to move armor, weapon, and tool properties out. The plan with Arsenic is that arsenic itself will only be for ingots and those lovely, truly wonderful storage blocks. (And probably a pressure plate, which I will try to have make an "UGH!" sound.) I may add swords, but they will be more brittle than gold. (And, ideally, a 50% chance to inflict poison on a hit.) The main use for arsenic is alloying. Arsenic + copper makes arsenide bronze, or red bronze. Arsenic can be added to gold to make red gold. Red bronze and red gold will be the two alloys that are used for stuff. Also, I would like red bronze swords to have a 5% chance of inflicting poison, and red gold swords to have a 10% chance to inflict poison.
So... yeah, ambitious for someone working with recipe packs. The key now is siting down with your example add-on, and probably Zot201's Only Silver, and replicating that and watching it work. I will follow zot's because he has an alternative texture for silver ore, and I will probably do the same for the arsenic storage block for sad, soulless people who don't want a zombie face staring at them. (not judging)
My other plans at this point:
The egg and cactus food. I already have a png tile. That would be really small, probably a better way hammer out a config file, and make a food item that restores hunger, saturation, and a heart of health. (The forge wiki has a link to a food tutorial, but it's a "no content yet" page.) That will also be good for arsenic, because the arsenide salts will be eat-able. That will be a very bad idea, but I'm throwing it in.
Then, I may try my hand at titanium. I also have an idea for a plant/crop.
So, yeah... a lot of different things to learn. It's just a matter of getting a good tutorial, time that is not too late at night, and an evening where I don't have someone competing for my attention.
Oh... I said "two main things". The second one is how to break up content into multiple class files. I saw you use the do command to initiate other class files, but what is the point at which you can just have an item class, and which you have a class files with your recipes that works.
Yes, I know a lot of that is Java itself. I'm reading up on that as I can.
I used no such "do" command I simply create a class for, say, tools, and then a method in there that says
public static void doTools()
{
}
And then in the init of the main class, I call that method by saying Tools.doTools();. It basically just calls that method and it is run just the same as if it was in the main class itself
I ended up basing it on your config file in the sample plugin on GitHub. It looks like the tutorial on the Forge site is based on 1.5.x, and Mincecraft 1.6.x changed these things.
I also found I misspelled orpiment in several places, which is really annoying. I can see my mineralogy professor glowering distainfully at me.
Anyway, it's after midnight. Tomorrow, I will add recipes to make arsenic, and get it into my live world. At this point, I may just add the red bronze and red gold large chunks, ingots, and blocks, and then do a very early pre-release.
Oh, and about the cactus and eggs dish, I think I will scratch that. Apparently Farmcraftory re-wrote the food classes to allow food items to be configured to heal. In the basic source code, they only restore hunger and/or saturation. I was planning on having noplaes con huevos heal a heart, as well as being on par with mushroom stew, but I'm not sure figuring out how to make a new food class for one item for a "random idea" plug-in is worth the effort. Also, I was going to have them stack to 8 so you could take a few exploring, but found that the soup food class, which is the one that returns an item, will convert the entire stack, apparently with the benefit of eating one, to return one item. That is why mushroom stews do not stack.
However...
An enterprising individual could use this to craft or Fusion a [iron | tin | steel] ingot with food to make the item Canned Food, and use the soup food class. I would say, though, have the output produce at least 4, preferably 8 items, though I don't know what happens if you have a craft process produce 8 items that do not stack. (Do they suddenly take 8 slots in inventory? Would 7 fly out of the Crafting Table or Fusion Furnace in random directions?) Anyway, with the soup class, you can specify any item to output. (You could make a cake that leaves a diamond when you are done. Think candy box with random prizes.) So... you make a "used tin" or "used can" item (depending on your variant of English), and then make the used tins smeltable into small chunks of [iron | tin | steel], which you can then use for compounding, or collect 7 to make a large chunk and smelt to an ingot.
Ok, that's far too much blathering for tonight. Good night, all.
Which defaults to a world ID of 6. There is a feature to allow the vanilla world settings to override ore generation, but that doesn't seem to work.
And so I thought...
If I did a plug-in, that was basically a copy of the ores generator class file in the init section, but set the world ID to x >1 (to eliminate The End from generation), would that stomp all over the core mod, or would it allow Simple Ores to appear in mods that generate higher dimensions?
I did not have a lot of time, but I've used your Simple Ores files to make an arsenic sword. Arsenide Bronze and Arsenide Gold (I've decided to go to their technical names, rather than "Red") will have full item sets (so I have to make armor, or at least edit yours or the core's), but I think arsenic will just have the sword.
I also have a few other ideas, and I know I have to start writing things down. I think my next will be a crop, that will actually be tied to the Fusion Furnace. However, I have to ask, do you think there is more interest in powerful, late-game ores, or early-game utility ores? I have on idea for the former, one for the latter, and titanium could go either way.
I did not have a lot of time, but I've used your Simple Ores files to make an arsenic sword. Arsenide Bronze and Arsenide Gold (I've decided to go to their technical names, rather than "Red") will have full item sets (so I have to make armor, or at least edit yours or the core's), but I think arsenic will just have the sword.
I also have a few other ideas, and I know I have to start writing things down. I think my next will be a crop, that will actually be tied to the Fusion Furnace. However, I have to ask, do you think there is more interest in powerful, late-game ores, or early-game utility ores? I have on idea for the former, one for the latter, and titanium could go either way.
Well, personally I think if they have SimpleOres installed, there is less demand for early materials, unless they have a LOT of utility uses. Late-game however allows them to be rare enough to justify their power, which means you don't end up with a lot of the material just lying around.
Ahhhhh......
I may re-do Arsenic like this. Oh, and the line: "The "morefusions" string should be the ModID of your plugin."
You may want to re-phrase that, as it could be read: "The string, here called 'morefusions', should be named your ModID", or "The ModID of your plugin should be 'morefusions'."
Fixed it I'll get more up, I ran out of time when I started the items one
Also, something I've mentioned here:
http://www.minecraftforum.net/topic/902350-162-simpleores-2-by-alexndrthegr8st-ssp-smp/page__st__2080#entry23807192
about the chunks. I'm going to implement it in Arsenic. I think mixing chunks as a form of compounding would be a good alternative to Fusion Forge and Smelting.
The recipe pattern I'm planning on using, if others would be interested is:
FROM TO
3 medium 1 large
5 small 1 large
2 medium + 2 small 1 large
--- ---
3 small 1 medium
--- ---
1 large 2 medium
--- ---
1 medium 2 small
It is always most efficient to go as directly to the large chunk as possible. Changing chunk size is also inefficient. However, chunks can be added to various treasures (zombies will very rarely drop arsenic stuff), so this is a way to incorporate stray pieces, or get a chunk size you need for a compounding recipe.
Your old files for, say blocks, was SimpleOresBlocks.copperOre.
Now, you named the file "Blocks.java", and Blocks.copperOre tries to resolve to the core blocks file. I'm working on this, but may need suggestions.
Seems to work.
Edit: It does work. I've just (1) learned the mass-comment command, and (2) tested a few of the copper and tin recipes.
I find a good way to do it is to import SimpleOres.core.Blocks and call it something like coreBlocks.
For example:
I actually tried that. (Yes, I seem to be slowly gathering skills.)The problem is, when I set "blocks" to "soblocks" (as I used), there are two "blocks" files. I tried setting soblocks to the full Simple Ores blocks file path, but I may have done something wrong.
Let me try one more time. If there is a change to the structure, it would be easy to change a variable.
Edit: Alas, yes, you are right. I must have mistyped something. I just smelted a copper and tin hoe. (Note: I set the variable to the entire path. "soTools" is "SimpleOres.core.Tools".)
Edit: The great <ctrl>C<ctrl>V frenzy is done... I have to take a break, then test in Eclipse, then add the new recycle set.
import SimpleOres.plugins.fusion.Content;
import SimpleOres.plugins.fusion.moreFusions.Content;
These two imports cause a "collision" error. Does Java not like importing two files of the same name?
Edit: tried this:
import SimpleOres.plugins.fusion.moreFusions.*;
...
public static SimpleOres.plugins.fusion.moreFusions.Content moreAlloy;
And Minecraft made a rather nasty splat. Unless I'm missing something, I may have to make a mini-mod-mod for the new alloy, and it can cause issues with people wanting to alloy it to any of the core alloys. If the new one was going to be an optional plug-in, having a separate file is probably preferable.
Try
public static SimpleOres.plugins.fusion.Content fusionContent;
public static SimpleOres.plugins.fusion.moreFusions.Content moreContent;
I may need to rename classes if that doesn't work.
I'm running a bit late, so I'm just updating my thread. I will work on it tonight and do a live test.
Also... For some reason everyone wants brass, though I don't see the advantage of having brass as opposed to bronze. You would need zinc, which is a metal that is mostly used for alloying.
I just looked up the top ten foods for zinc. Three of them are roasted wheat, roasted pumpkin seeds, and roasted watermelon seeds.
There is so much about modding I must learn....
What kind of things do you think you need to learn? Just curious.
The main thing is config files. I started on that, but then I've had to spend my Minecraft time the past few evenings doing a lot of cutting-and-pasting in my recipe files, and then testing. (My KVM switchbox sees <ctrl><ctrl> as a change-input command so I ended up plugging a second keyboard into my PC.) Oh, and the testing reminds me: I moved my mods to the "fusion" folder, which you requested for plug-ins so they can be more easily packaged. However, you may want to put a notice that if you do this, be sure to carefully clean out anything from the core Simple Ores mod when you zip that in your reobfusciate folder. At one point I apparently missed one of your class files, and Minecraft did a rather mighty implosion into oblivion.
That pushed any time to learn a bit too close to midnight, and at that point I just want to play 20 minutes of Minecraft and get to bed.
Anyway, the two main things now are the config files, so I can add items, and then how to break up a class file into multiple class files. In Arsenic, I have a block class and item class, and the screen shot shows they work, but as the mod grows I want to move armor, weapon, and tool properties out. The plan with Arsenic is that arsenic itself will only be for ingots and those lovely, truly wonderful storage blocks. (And probably a pressure plate, which I will try to have make an "UGH!" sound.) I may add swords, but they will be more brittle than gold. (And, ideally, a 50% chance to inflict poison on a hit.) The main use for arsenic is alloying. Arsenic + copper makes arsenide bronze, or red bronze. Arsenic can be added to gold to make red gold. Red bronze and red gold will be the two alloys that are used for stuff. Also, I would like red bronze swords to have a 5% chance of inflicting poison, and red gold swords to have a 10% chance to inflict poison.
So... yeah, ambitious for someone working with recipe packs. The key now is siting down with your example add-on, and probably Zot201's Only Silver, and replicating that and watching it work. I will follow zot's because he has an alternative texture for silver ore, and I will probably do the same for the arsenic storage block for sad, soulless people who don't want a zombie face staring at them. (not judging)
My other plans at this point:
The egg and cactus food. I already have a png tile. That would be really small, probably a better way hammer out a config file, and make a food item that restores hunger, saturation, and a heart of health. (The forge wiki has a link to a food tutorial, but it's a "no content yet" page.) That will also be good for arsenic, because the arsenide salts will be eat-able. That will be a very bad idea, but I'm throwing it in.
Then, I may try my hand at titanium. I also have an idea for a plant/crop.
So, yeah... a lot of different things to learn. It's just a matter of getting a good tutorial, time that is not too late at night, and an evening where I don't have someone competing for my attention.
Oh... I said "two main things". The second one is how to break up content into multiple class files. I saw you use the do command to initiate other class files, but what is the point at which you can just have an item class, and which you have a class files with your recipes that works.
Yes, I know a lot of that is Java itself. I'm reading up on that as I can.
And then in the init of the main class, I call that method by saying Tools.doTools();. It basically just calls that method and it is run just the same as if it was in the main class itself
I'm sorry, is my BASIC showing? I didn't mean to fart in refined company like that.
I ended up basing it on your config file in the sample plugin on GitHub. It looks like the tutorial on the Forge site is based on 1.5.x, and Mincecraft 1.6.x changed these things.
I also found I misspelled orpiment in several places, which is really annoying. I can see my mineralogy professor glowering distainfully at me.
Anyway, it's after midnight. Tomorrow, I will add recipes to make arsenic, and get it into my live world. At this point, I may just add the red bronze and red gold large chunks, ingots, and blocks, and then do a very early pre-release.
Oh, and about the cactus and eggs dish, I think I will scratch that. Apparently Farmcraftory re-wrote the food classes to allow food items to be configured to heal. In the basic source code, they only restore hunger and/or saturation. I was planning on having noplaes con huevos heal a heart, as well as being on par with mushroom stew, but I'm not sure figuring out how to make a new food class for one item for a "random idea" plug-in is worth the effort. Also, I was going to have them stack to 8 so you could take a few exploring, but found that the soup food class, which is the one that returns an item, will convert the entire stack, apparently with the benefit of eating one, to return one item. That is why mushroom stews do not stack.
However...
An enterprising individual could use this to craft or Fusion a [iron | tin | steel] ingot with food to make the item Canned Food, and use the soup food class. I would say, though, have the output produce at least 4, preferably 8 items, though I don't know what happens if you have a craft process produce 8 items that do not stack. (Do they suddenly take 8 slots in inventory? Would 7 fly out of the Crafting Table or Fusion Furnace in random directions?) Anyway, with the soup class, you can specify any item to output. (You could make a cake that leaves a diamond when you are done. Think candy box with random prizes.) So... you make a "used tin" or "used can" item (depending on your variant of English), and then make the used tins smeltable into small chunks of [iron | tin | steel], which you can then use for compounding, or collect 7 to make a large chunk and smelt to an ingot.
Ok, that's far too much blathering for tonight. Good night, all.
http://www.minecraftforum.net/topic/1679684-forge-162-aroma1997s-mods/
Which defaults to a world ID of 6. There is a feature to allow the vanilla world settings to override ore generation, but that doesn't seem to work.
And so I thought...
If I did a plug-in, that was basically a copy of the ores generator class file in the init section, but set the world ID to x >1 (to eliminate The End from generation), would that stomp all over the core mod, or would it allow Simple Ores to appear in mods that generate higher dimensions?
I also have a few other ideas, and I know I have to start writing things down. I think my next will be a crop, that will actually be tied to the Fusion Furnace. However, I have to ask, do you think there is more interest in powerful, late-game ores, or early-game utility ores? I have on idea for the former, one for the latter, and titanium could go either way.
Well, personally I think if they have SimpleOres installed, there is less demand for early materials, unless they have a LOT of utility uses. Late-game however allows them to be rare enough to justify their power, which means you don't end up with a lot of the material just lying around.