Jump to content

arungupta

Members
  • Posts

    55
  • Joined

  • Last visited

Everything posted by arungupta

  1. Isn't mod implicitly means modifying vanilla Minecraft source code ? This is counter intuitive otherwise.
  2. With Forge, am I making plugins or mods ? Bukkit was allowing me to make plugins. Forge 1.6.4 allowed to change the original source code and so my impression that these were mods. Now with Forge 1.7.10, separate files are created that sits on the top of the existing source code. http://minecraft.gamepedia.com/Mods/Creating_mods does not use the plugin terminology. Are thees plugins or mods ? What is the correct terminology ?
  3. With no Internet, we can carry a zip file on a USB drive and get started that way. Configuring Maven on a 8-14-yrs old kid's machine is quite a harrowing task. We've done that multiple times and prefer to go the simpler route. Especially when 20-50 kids are involved in a classroom setting. I'd really love to see an offline version of the installer. Any thoughts ?
  4. Sounds fair, I removed the files from github. The classroom setting where I teach may not have Internet access. How do you recommend we work around that ? Is there anyway, such a bundle can be provided on http://files.minecraftforge.net/ ?
  5. Ah, I suspected something like that. Is there any thing that can be done to keep the installation confined to a single bundle ? This used to work very well with 1.6.4 bundles.
  6. Specifically ... I create a zip bundle on Mac and when I unzip it on Windows and try to open the project in Eclipse, then the Minecraft project does not show up by default. When I try to explicitly import the project in Eclipse, then it says "No project found" or a similar message. I tried building a zip package on a Windows machine (where project can be opened successfully) and unzipping on a different one. The Minecraft project is not showing up on the other machine. The bundles are available at: https://github.com/arun-gupta/forge-plugins Any clues ? Arun
  7. I download the XXX-src.zip from files.minecraftforge.net, run the gradlew commands, and zip up the bundle. This is then shared in a class setting so that all attendees don't have to go through the commands themselves. We call this "modkit". Is the zip bundle such created would be platform agnostic ? Can the same bundle run on Windows and Mac ? Or even Linux ?
  8. Thanks! Once "setupDecompWorkspace" is invoked and the package is zipped, is the zip bundle platform agnostic and can be used on Windows, Mac, and Linux ?
  9. So just "setupDecompWorkspace eclipse" is enough to setup workspace where all the source files from forge can be correctly opened ? Arun
  10. Never mind, the correct order of commands is: setupDevWorkspace setupDecompWorkspace eclipse And now it does!
  11. Latest 1.7.10 (http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.10-10.13.2.1231/forge-1.7.10-10.13.2.1231-src.zip) is giving a patch error: Applying forge patches Patching failed: net/minecraft/world/gen/feature/WorldGenDungeons.java Cannot find hunk target 2: Cannot find hunk target @ 0 1/3 failed Rejects written to /Users/arungupta/tools/minecraft/forge-1.7.10-1231/build/tmp/expandedArchives/forgepatches.zip_65do1hgfnb3dpj1qsdv38go5bq/net/minecraft/world/gen/feature/WorldGenDungeons.java.patch.rej :remapJar :extractMinecraftSrc :recompMinecraft warning: [options] bootstrap class path not set in conjunction with -source 1.6 Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 warning :repackMinecraft :setupDecompWorkspace
  12. I see there are three packages in Forge 1.7.10 that have events: cpw.mods.fml.common.event net.minecraft.event net.minecraftforge.event Can anybody explain the purpose of which to use when ?
  13. So I built my first plugin, pretty cool, thanks for all the help so far. However I was wondering what's the purpose of duplicating "modid" and "name" in mcmod.info and @Mod ? How can I specify it at one place, and use it in the other ?
  14. Oh yeah, that was it, thanks a lot! What's the purpose of spawning a new entity instead of using event.entity ? The following code, as opposed to the one given above, worked as well: @SubscribeEvent public void init(EntityJoinWorldEvent event) { if (!(event.entity instanceof EntityTNTPrimed)) return; event.world.createExplosion(event.entity, event.entity.posX, event.entity.posY, event.entity.posZ, 25.0F, true); }
  15. Didn't work. Here is my complete class: package org.devoxx4kids.forge.plugins.biggertnt; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityTNTPrimed; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @Mod(name = BiggerTNTExplosion.NAME, modid = BiggerTNTExplosion.MODID, version = BiggerTNTExplosion.VERSION) public class BiggerTNTExplosion { public static final String MODID = "examplemod"; public static final String VERSION = "1.0"; public static final String NAME = "1.7.10"; @EventHandler public void init(FMLInitializationEvent event) { // world.createExplosion(exploderEntity, x, y, z, radius, spawnParticles); // some example code System.out.println(NAME + " mod loaded"); // System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName()); } // @EventHandler // public void init(EntityJoinWorldEvent event) // { // if (!(event.entity instanceof EntityTNTPrimed)) // return; // // event.setCanceled(true); // event.world.createExplosion(event.entity, // event.entity.posX, // event.entity.posY, // event.entity.posZ, // 15.0F, // true); // } @SubscribeEvent public void init(EntityJoinWorldEvent event) { if (!(event.entity instanceof EntityTNTPrimed)) return; EntityItem splosion = new EntityItem(event.world, event.entity.posX, event.entity.posY, event.entity.posZ, new ItemStack(Blocks.dirt,1,0)); event.world.spawnEntityInWorld(splosion); event.world.createExplosion(splosion, event.entity.posX, event.entity.posY, event.entity.posZ, 25.0F, true); event.world.removeEntity(splosion); } } Suggestions ?
  16. The following code still does not work: @EventHandler public void init(EntityJoinWorldEvent event) { if (!(event.entity instanceof EntityTNTPrimed)) return; EntityItem splosion = new EntityItem(event.world, event.entity.posX, event.entity.posY, event.entity.posZ, new ItemStack(Blocks.dirt,1,0)); event.world.spawnEntityInWorld(splosion); event.world.createExplosion(splosion, event.entity.posX, event.entity.posY, event.entity.posZ, 25.0F, true); event.world.removeEntity(splosion); } Thoughts ?
  17. How should the code be modified ? The first parameter is "event.entity" instead of "splosion", right ?
  18. This will be shown in Minecraft workshops and boys love bigger explosions. The question being I'm not seeing the bigger size though. What needs to be different in the code to make the explosion bigger ?
  19. So I updated the method to: @EventHandler public void init(EntityJoinWorldEvent event) { if (!(event.entity instanceof EntityTNTPrimed)) return; event.setCanceled(true); event.world.createExplosion(event.entity, event.entity.posX, event.entity.posY, event.entity.posZ, 40, true); } But still not seeing bigger explosions, any suggestions ?
  20. Alright, this was very helpful. So I created my first mod as: @EventHandler public void init(EntityJoinWorldEvent event) { World world = event.world; event.world.createExplosion(event.entity, event.entity.posX, event.entity.posY, event.entity.posZ, 40, true); } I clicked on the "Run" button to run the client profile. But still not seeing the bigger TNT explosion size.
  21. Agreed. In Forge 1.6.4, I was changing the source code, recompiling and showing the effects. But would like to build real plugins in 1.7.10. And so looking at the source code would be handy. For example, I don't know how to get "world" in my plugin so that bigger explosions can be created. Clues ?
  22. "build" directory had only the following files: build build/.gitignore build/natives build/natives/libjinput-osx.jnilib build/natives/liblwjgl.jnilib build/natives/libtwitchsdk.dylib build/natives/openal.dylib build/tmp build/tmp/makeStart build/tmp/makeStart/GradleStart.java build/tmp/makeStart/GradleStartServer.java Are the classes generated and then cleaned up ? Found some sources in forge-1.7.10-userdev.jar but no EntityTNTPrimed. Also found some sources in .gradle/caches/minecraft as well, but not this one. Eclipse can show the class. Where can I find the associated source so that can attach with it ?
  23. Just getting started with 1.7.10 ... How would I get world in the sample mod ? Is the associated source code for Minecraft available somewhere ? Ability to read the source in 1.6.4 was a huge benefit.
×
×
  • Create New...

Important Information

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