Jump to content

kauan99

Members
  • Posts

    210
  • Joined

  • Last visited

Everything posted by kauan99

  1. Hello, I'm new to mod coding and Java programing (have only a little bit of experience in C#), so I'm sorry if this is a dumb question. Also, my English is far from perfect, so pardon me for that too. I searched the forums for some thread about this matter but I couldn't find one (I forgot to mention that I suck at searching forums too). My problem is: I want to add a shapeless recipe which outputs a mossy cobblestone block and uses one leaves block and one cobblestone block as ingredients. My code is: ItemStack leavesBlock = new ItemStack(Block.leaves); ItemStack cobbleStoneBlock = new ItemStack(Block.cobblestone); GameRegistry.addShapelessRecipe(new ItemStack(Block.cobblestoneMossy), //output leavesBlock, cobbleStoneBlock); //ingredients I get no errors when recompiling, reobfuscating and running. But the recipe only works with oak leaves. If I use spruce leaves, birch leaves or jungle leaves nothing gets formed in the output box of the crafting table. I think that's very strange and I imagined a solution: to instantiate one ItemStack for each type of leaf and to add 4 recipes. I don't think this is how I should solve this, and also, I don't even know how to instantiate a block of a certain type of leaf (so if anyone know how to instantiate an ItemStack of a certain type of leaf that info would be much welcome and apretiated too). What am I doing wrong? Thanks in advance.
  2. Hello again. Well, I don't register icons or anything like that for my custom blocks and items. I put them in the folders I mentioned and I'm good to go. It works fine too when you put the needed textures inside minecraft.jar\textures. All I had to do was to drag my \forge\mcp\eclipse\Minecraft\bin\textures folder (wich, as you remember, contains 2 folders, one named "blocks" and the other named "items") inside minecraft.jar and, as expected, my textures folder merged with minecraft.jar\textures, adding my textures to their correct locations: a) the textures in \forge\mcp\eclipse\Minecraft\bin\textures\blocks were copied to minecraft.jar\textures\blocks b) the textures in \forge\mcp\eclipse\Minecraft\bin\textures\items got copied into minecraft.jar\texture\items Well, since I'm not a pro mod coder and I'm just doing it for fun, I think I'll stick with this aproach until some situation arrises where this is not enough anymore. Thanks for your info on registering icons, though! I'll keep that in mind for when I need something more advanced.
  3. Thank you for your answer. I found out that, if you're using eclipse (which is my case), the textures go in \forge\mcp\eclipse\Minecraft\bin\ Inside that bin folder you have to create a folder named textures, and inside that folder named textures you have to create 2 other folders, one named items and another named blocks. Inside that 2 folders you put the textures for your mod items and blocks respectively. The texture must have the exact same name that you give to the item/block through the method setUnlocalizedName(String s). It will get automatically loaded and associated with the item/block of same name. No further work needed to run minecraft from eclipse. I dont know about other textures such as GUI textures etc. Now I need to know where those textures go when I deploy my mod. Do they kinda ship in the zip and I tell people "extract these and put them inside minecraft.jar" or what? As for the tutorials, they are outdatted I think. And they are not clear enough on several points. I'm using them though, they are great help. Thanks again!
  4. Yay! problem solved, thanks a lot for everyone's help. It turned out Senitiel had the solution. All I had to do was to install both src and universal of version 1.5.1-7.7.0.608 (which is not the recommended download but the latest instead). My mod works (sort of, I still need to learn where to put my textures) and Forge is running smoothly. Everything is just great right now. I'll finish working on my silly mod and then I'll have to learn some new modding skills. Any good tutorials out there someone could point out to me? Thanks. A lot. Everyone.
  5. Thanks for your answer, I think this problem has something to do with what you said. I had the recommended src but the latest universal, so they were not of the same version. Regardless of that, forge was running normally, but my mod was causing a crash. Without my mod in the mod folder forge loaded and I could play minecraft normally. It even downloaded it's required libraries on first load Now I downloaded the matching universal and minecraft won't finish loading (and no sign of forge's little window, no library download, just nothing from forge). This is what I've done: I extracted the newly downloaded universal zip file (matching my src) to a folder and copied the contents of that folder into \.minecraft\bin\minecraft.jar. Then i deleted from the META-INF folder any files with "MOJANG" in their name (leaving only MANIFEST.MF, FORGE.SF, FORGE.DSA) I don't get an error or crash, the loading just freezes forever. I'm in a hurry now because I'm late for school, but as soon as I get home I'll check this thread and I'll redo the whole thing again (deleting \.minecraft\bin\ so the launcher can download a fresh one for me). Thanks again! I feel this problem will be solved soon. EDIT: I did that while eating breakfast: deleted \bin and ran minecraft. It downloaded all it needed and the game loaded ok. I loaded one of my saves: everything fine. Then I dragged the files from the universal (the corrected one, matching my src, both of them of version 1.5-7.7.0.582) and again I got the same problem: game loading got stuck with the message "done loading" (same as before). I'm going to school a little less hopeful than I was before this try.
  6. Again, pardon my English. It's the best I can do. I'm sorry about the title of this thread. When I started it I thought the issue was related to deployment, but I'm no longer sure. Well, I made a few radical tests. One of them was to replace all the content inside the load method by this meaningless computations: public void load(FMLInitializationEvent event) { int x = 2; int y = 3; int z = x + y; } I then deployed the kauan folder as a zip (thanks for the tip coolboy4531) and put it into my mods folder under .minecraft. Minecraft loaded my mod successfully. So I have a feeling I'm putting my zip folder in the right place. Then I changed the code again, replacing again the body of the load method, this time with the following: public void load(FMLInitializationEvent event) { Block dirt = Block.dirt; } And this time I got the exact same error as above ("java.lang.NoSuchFieldError: field_71979_v" and all that) I believe I reduced the problem as much as possible, but since I'm a real newbie at mod coding (I started just a few hours ago) I can't figure out what's wrong with my mod. Please, could anyone help me with this? I'm really lost, i mean, how can a line so simple generate an error? I'm not a Java Programer or anything but I checked the definition of the Block class and it's fields. It seems to me that what I'm trying is a legal operation. The class is public and the field dirt is marked as public static final. As far as I know theres nothing sintatically wrong with that little line of code. As I said I'm not a Java programer (honestly I'm no programer at all, just a curious 13 years old kid), so I'm guessing it may have something to do to the static fields of the Block class not being available at the time the load method is called? I don't know neither when this method is called nor when the static construction of a Java class takes place. Well these are my rambling thoughts on that matter. Please, I'd really apreciate any help at all from the comunity. Thanks in advance.
  7. Thanks for your help. Well, I turned my kauan folder into a kauan.zip file. I still get an error although a different one: Looks like there's something wrong with my code, as if I'm referencing something that doesn't exist? But what confuses me is that this very same code runs fine when I execute it by pressing the green little arrow on eclipse...
  8. Hello, pardon my English. Well, I coded a mod (my first one, as a study on mods. I was following some tutorials). All it does is to add a few new recipes (based on the tutorials I read that's probably one of the simplest tasks). The mod runs fine when I click the green button on eclipse and all the recipes are working. I then copy the folder generated under \forge\mcp\reobf\minecraft to the mods folder under .minecraft (%AppData%\Roaming\.minecraft\mods). I run minecraft and after mojang logo my minecraft window shows an error regarding my mod (Minecraft crashed... etc). So, my folder structure as found under \forge\mcp\reobf is as follows: minecraft\ kauan\ MoreRecipes\ client\ ClientProxy.class CommonProxy.class MoreRecipes.class (I hope that's clear enough) I think CommonProxy and ClientProxy classes are useless for my mod but I have them anyway, because I was following tutorials. these are my classes CommonProxy (this one is pretty much empty) ClientProxy (even more empty than the one above) MoreRecipes i tryed copy-pasting the "kauan" folder to \.minecraft\mods, tryed the same with the "MoreRecipes" folder, and none of that worked. Now the error part of the log (I don't believe i have to paste the whole log... it's really long. So I'll just put here the begining wich contains information about the version of forge and stuff, and the error part). I'm a newbie, this is my first try, I hope my post is all according to the forum rules. Thanks in advance.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.