Jump to content

PlatonCraft

Members
  • Posts

    114
  • Joined

  • Last visited

Everything posted by PlatonCraft

  1. There is an easier way to register textures. If you have item, in Item's method write this.setTextureName("me:transparent"); I don't know whether it's work for block but must work too. There is structure of assets to your mod
  2. Oh, sorry. I didn't know. i am bad programmer, that's true. Thank tou all and sorry for my silliness.
  3. That's really stupid. I don't know what's wrong. When I check equality of par3World.func_147439_a(par4, par5, par6) (This fuction gets Block) to Blocks.stone (This IS Block) if (par3World.func_147439_a(par4, par5, par6) == Blocks.stone) I knock on the stone, all goes good. As it should be! But when I check equality of par3World.func_147439_a(par4, par5, par6).func_149739_a() to Blocks.stone.func_149739_a() func_149739_a() gives unlocalized name of block like "tile.stone" First of all I checked it in console System.out.println(par3World.func_147439_a(par4, par5, par6).func_149739_a()); System.out.println(Blocks.stone.func_149739_a(); In console I saw ABSOLUTELY same strings tile.stone and tile.stone BUUUTTT!!!!!! if (par3World.func_147439_a(par4, par5, par6).func_149739_a() == Blocks.stone.func_149739_a()) AND THEY'RE NOT EQUAL ANYMORE!!!!!!!!! But they're equal, I know it. ALSO if (Blocks.stone.func_149739_a() == Blocks.stone.func_149739_a()) AND HE SAYS THAT THESE STRINGS ARE NOT EQUAL!!!!!!!!!!!!!!!!!!! Please help, it's very strange.
  4. World func_147449_b(int, int, int, Block) : setBlock(posX, posY, posZ, Blocks.block) //Spawns block block to coords func_147437_c(int, int, int) : isAirBlock(posX, posY, posZ) //Checks whether block on coords is air or not func_147439_a(int, int, int) : getBlock(posX, posY, posZ) //What block is on coords Block func_149732_F() : getLocalizedName() //gets localized name of block func_149688_o() : getBlockMaterial() //gets block material func_149739_a() : getUnlocalizedName() //gets tile.unlocalizedname
  5. In eclipse you may put files like before So, if you have files there in eclipse and you build jar with instructions above compiler will AUTOMATICLY put all your resourse files in jar-file. Don't forget that you may easily unpack you jar-file and make zip-file with you mod You may download my mod and look into its structure http://yadi.sk/d/OdnWYFCVFZk9V
  6. Sorry, mac isn't my system, I don't know what to do in this way. An error says that problem with natives so I think that problem in Java(Try to reinstall it) or internet (maybe he couldn't download natives)
  7. Yes, I solved it! I just renamed folder "Sound" to folder "Sounds" This shows that one symbol in programming can make you want suicide.
  8. I would be very happy if someone would help me. And I have a little progress. Before on trying to play "flintstonetools:items.stonestrike" (That not registered obviously) I was getting messages Unable to play unknown soundEvent: flintstonetools:items.stonestrike That says that I've never registered this sound. Then I created 2 files in folder assets/flintstonetools [spoiler=pack.mcmeta] { "pack": { "pack_format": 1, "description": "FlintStone Tools" } } and [spoiler=sounds.json] { "items.stonestrike": { "category": "neutral", "sounds": [ "items/stonestrike" ] } } And now I getting messages Unable to play empty soundEvent: flintstonetools:items.stonestrike EMPTY!!! Not unknown, EMPTY!! I am happy, but where am I wrong, and what I need to do to make it not empry?? Please, help!!!
  9. I will paste here my old message with instructions. It MUST work.
  10. This will help you http://www.minecraftforge.net/forum/index.php/topic,15232.0.html
  11. Actually... No. FML adds this. I know that FML does it, I say that ID is not random.
  12. Id's are not totally gone. They are automatically assigned whenever you load a world. That means in world A your Item could be id 2244 and in World B it could be 15543. Don't fumble with Ids. They are automatically handled in the background. No, actually ID is static and Items get it in order of loading to Minecraft. Mod Ids start from 4096 and next registered item takes ID 4097 etc. But this is not important anymore =)
  13. YEAHHHH, I SOLVED IT!!!! Finally. What to do described here http://www.minecraftforge.net/forum/index.php/topic,15232
  14. Still unresolved! Help!!! Maybe any idea? I checked all functions in event.manager Look like there are no functions to load sounds.
  15. Ok, you coded your mod. Now you need to compile it. I don't know accurate instructions, but know how to compile mod. FIRST. Open your build.gradle file with notepad or something like notepad to change version and name of your Mod. (You may not do this) You can change this: version = "1.0" //any version, e.g. "8.46.1.1046 pre-alpha" group= "com.yourname.modid" // Not necessary, e.g. "megacrafter.mods.mybestmodevar" archivesBaseName = "modid" //Name of mod, e.g. "My Best Mod EVAR" save build.gradle and exit SECOND. Run gradlew.bat with command build In another words create bat-file if forge folder with gradlew.bat build and start it. Congratulations! Your mod compiled and in build folder. [spoiler=If you getting error while building on :deobf] First run gradlew.bat with command cleancache --refresh-dependencies (Just edit your bat-file to "gradlew.bat cleancache --refresh-dependencies") and paste this code to bottom of your build.gradle reobf {deobfFile = new net.minecraftforge.gradle.delayed.DelayedFile(project, "build/tmp/deobfBinJar/deobfed.jar") } If you getting error again reinstall forge acoording to my tutorial. Good luck with coding.
  16. That's bit uncomfortably for me. But I thought so. If ID's are gone why any item still have id? Even my items, they have id 4096, 4097, etc.
  17. if I know what function really does what should i do?
  18. I know this maybe is silly question, but how can I give an ID to my Block or Item in 1.7.2? Anybody knows? Also I want help with these questions if somone know. http://www.minecraftforge.net/forum/index.php/topic,15190.0.html http://www.minecraftforge.net/forum/index.php/topic,15185.0.html
  19. Question obviously is how to register sounds in 1.7.2 @ForgeSubscribe public void onSoundsLoaded(SoundLoadEvent event) { event.manager.soundPoolSounds.addSound("modid:soundname.ogg"); } This code doesn't work anymore. And I can not find obfuscated function. Please help!!!
  20. World.func_147449_b(Xcoord, Ycoord, Zcoord, Blocks.stone); Like Draco18s said
  21. That's easy. You have assets in wrong place. Copy folder 'assets' to folder where you can see folders like 'save', 'config', 'mods', etc. 'Assets' folder must be in 'eclipse' folder for default.
  22. Thank you really much!!! I thought that for this I need some code. And I can advise you again to update forge. I found how to fix assets don't work. These instructions for you if you use eclipse Create new folder anywhere, extract forge src to this folder, and run gradlew.bat with command setupDevWorkspace (create bat file with string "gradlew.bat setupDevWorkspace" and launch it), then run gradlew.bat with command eclipse (bat with "gradlew.bat eclipse"). After all start Eclipse and make folder "Your-Forge-Src-Folder/eclipse" eclipse workspace. The End. =)
  23. maybe you not noticed that you have no sounds? Also I can advice you to update your forge, because in new versions less of bugs. Can you say please how do you use lang files? Did you meant you use files in assets/lang? If so say please how can Iuse it?
×
×
  • Create New...

Important Information

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