Jump to content

dand0

Forge Modder
  • Posts

    39
  • Joined

  • Last visited

Everything posted by dand0

  1. Thank you for reply, but I meant, that I can't open them. I have to change main post.
  2. Spoilers don't work for me. I can't open them. I use Google Chrome, but I also tried Internet Explorer, the same. What can I do?
  3. You need to replace: public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) with: public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
  4. Yes, you can do it with Maven and Ivy publishing plugin for Gradle. Read about Ivy plugin here and about Maven plugin here.
  5. You are new. Gradle and Maven are diffrent things, as Ivy and Ant. Read about it in wikipedia. Those 3 lines compile source of RF-API.
  6. TeamCoFH doesn't have maven repo, that's why I didn't talk about Maven Dependency. And yes, I forgot to talk about compiling. You should compile your mod so: Open build.gradle file, and add the following code: dependencies { compile files ("lib/RF-API.jar") } P.S in mcmod.info add following code: "dependencies": ["ThermalExpansion"], "useDependencyInformation": "true" P.P.S As far as I know, Redstone Flux API is only used in Thermal Expansion, that's why I printed "ThermalExpansion" (mod ID) in "dependencies" field.
  7. Yes. Follow this instruction: 1. Assuming you already have your workspace set up, create a new folder named "/lib" in your project directory. That's the directory that contains your /bin, /build, /gradle, and /src folders, and now also has a /lib folder. 2. Download Thermal Expansion and place it into /mods folder, that locates in /eclipse folder. Download RF-API source file and place it in the /lib folder you just created. 3. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then "Add External JARs" and find the TE file that you just placed in the /mods folder. 4. Open the "Referenced Libraries" tree in your package explorer, find the API binary that you just referenced and right-click on it; go to "Properties" -> "External location" -> "External file" and navigate to the source file in the /lib folder. Original tutorial by coolAlias. Edited by me. Tip: use search.
  8. My friend thanks you very much. Everything works, he said.
  9. Hello! My friend is working on a mod, and tries to add a block. When he tries to save the .lang file as ANSI, localizing works, but when he saves the file as UTF-8, localizing doesn't work. Here is source code. He is using Forge 1180.
  10. Doesn't developer workspace download JavaDoc?
  11. I mean, can I run gradlew.bat setupDecompWorkspace then gradlew.bat setupDevWorkspace and at last gradlew.bat eclipse and have a validate eclipse workspace?
  12. Can I use both decompile and developer workspace?
  13. Do not deobfuscate ComputerCraft, because it do provides API. Download ComputerCraft (I'll call it "CC" next, OK?) 1.63 1. Assuming you already have your workspace set up, create a new folder named "/lib" in your project directory. That's the directory that contains your /bin, /build, /gradle, and /src folders, and now also has a /lib folder. 2. Place ComputerCraft1.63.jar into "/lib" you just created. 3. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then "Add External JARs" and find the binary CC file that you just placed in the /lib folder. To add JavaDoc and API source code: 1. Open ComputerCraft1.63.jar with any 7zip or any other archivator, go to "api", there will be 2 folders: "doc" and "src". The first contains JavaDoc, the second source. Copy these folders to any folder. 2. Create 2 files called "ComputerCraft1.63JavaDoc.zip/jar" and "ComputerCraft1.63APISRC.zip/jar". Into the first file extract "doc" folder, then, open "src" folder, there you'll see "dan200" folder", add it into "ComputerCraft1.63APISRC.zip/jar". 3.Move "ComputerCraft1.63JavaDoc.zip/jar" and "ComputerCraft1.63APISRC.zip/jar" into /lib folder. 4. Open the "Referenced Libraries" tree in your package explorer, find "ComputerCraft1.63.jar" and right-click on it; go to "Properties" -> "External location" -> "External file" and navigate to wherever you stored the source file (ComputerCraft1.63APISRC.zip/jar), preferably right next to the binary in the /lib folder. 5. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then find ComputerCraft1.63.zip/jar, select "JavaDoc Location" and click "edit" and find the JavaDoc CC file that you just placed in the /lib folder. 6. Run your debug configuration and see if everything is still working; if so, great! If not, you may need to run setupDev and setupDecomp workspace one more time: a. gradlew setupDevWorkspace b. gradlew setupDecompWorkspace c. gradlew eclipse // will vary depending on your IDE Once you have the debug client working, you should see that both your mod and CC are loaded; if you start a new game, anything added by CC will be in that game as well and should be fully functional.
  14. Maybe you should use register blocks in method with argument "FMLPreInitializationEvent" not in "FMLInitializationEvent"?
  15. Go to "the folder forge installed in/build/unpacked/conf/" and open file "packaged.srg" with WordPad and search for a due obfuscated class name you are reflecting, as an example, I'll reflect EntityCreeper. I search "EntityCreeper" and it will find a line, that contains this: CL: wl net/Minecraft/entity/monster/EntityCreeper "wl" is EntytyCreeper's class obfuscated name.
  16. For getting localized name use Item/BlockClass.getLocalizedName .
  17. Use ASM, Coremods or Events. Tutorial (for 1.6.2): http://www.minecraftforum.net/topic/1854988-tutorial-162-changing-vanilla-without-editing-base-classes-coremods-and-events-very-advanced . Also, there is a mod, called "Battlegear 2", go to its GitHub repository (https://github.com/Mine-and-blade-admin/Battlegear2/blob/master/battlegear%20mod%20src/) and explore the code (this mod patches EntityPlayer class and many more)
  18. Create a class and add the following code there: package your.own.package.here; import net.minecraft.entity.monster.EntitySkeleton; import net.minecraft.entity.monster.EntitySpider; import net.minecraft.entity.monster.EntityZombie; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.EntityJoinWorldEvent; public class EntityJoinWorldHandler { @ForgeSubscribe public void onEntitySpawn(EntityJoinWorldEvent event) { if(event.entity !instanceof YourEntityClass || event.entity !instanceof YourEntityClass2 || event.entity !instanceof YourEntityClass3) { event.setCanceled(true); } } } Then add the following code in your main mod file in init in 1.6 or in preInit in 1.7: MinecraftForge.EVENT_BUS.register(EntityJoinWorldHandler()); That will not spawn any entity, except the entities, that were listed in the method.
  19. How can I register commands to client ? My command shows all ops on a server. In standart Forge server, with my command registered (FMLServerStartingEvent) it works fine. But when I connect to a server without my mod in server it shows error (there can be nothing else ) . So, I need my command work in a client not in server. For example, a vanilla server on 1.7.2 without any mods or plugins called "Vanillians". I connect to the server "Vanillians" with Forge and my mod enable in client, and type command "/ops" in server, and it shows me all the ops About command "/ops", it's an example and I will not make a mod like this.
  20. How to register commands and where is the class, that register vanilla commands in ServerCommandManager, and I should register them in init or preinit?
  21. 1. Assuming you already have your workspace set up, create a new folder named "/lib" in your project directory. That's the directory that contains your /bin, /build, /gradle, and /src folders, and now also has a /lib folder. 2. Ask the mod author(s) for a binary distributable / source file of their mod and place it in the /lib folder you just created. 3. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then "Add External JARs" and find the binary file that you just placed in the /lib folder. 4. If the API author provided a source file, open the "Referenced Libraries" tree in your package explorer, find the API binary that you just referenced and right-click on it; go to "Properties" -> "External location" -> "External file" and navigate to wherever you stored the source file, preferably right next to the binary in the /lib folder. 5. Run your debug configuration and see if everything is still working; if so, great! If not, you may need to run setupDev and setupDecomp workspace one more time: a. gradlew setupDevWorkspace b. gradlew setupDecompWorkspace c. gradlew eclipse // will vary depending on your IDE Once you have the debug client working, you should see that both your mod and the API are loaded; if you start a new game, anything added by the API mod will be in that game as well and should be fully functional. This is extremely handy while developing an addon or simply testing compatibility between mods. You are now ready to start using the API in your mod! Tutorial by coolAlias.
  22. First run gradlew setupDecompWorkspace then gradlew setupDevWorkspace and then gradlew eclipse If you didn't understand, first setup decomplie workspace and only then setup Developer Workspace and then run IDE task. Also before running commands delete all files from the folder you have extracted the files and then reextract the forge zip.
  23. Where is the code, which causes entities with names "Dinnerbone" and "_grumm" rotate to 180°?
  24. Run gradlew setupDecompWorkspace --refresh-dependencies --debug After run gradlew setupDevWorkspace --refresh-dependencies --debug And at last run gradlew eclipse --debug setupDecompWorkspace only generates decompiled forge, forge fmled, forge fmlinjected, forge mcped, forge source nojd, forge srg and forge source. setupDevWorkpsace generates forge javadoc, forge bin patch, forge binaries, and "forgeSrc".
×
×
  • Create New...

Important Information

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