Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


Forge Modder
  • Posts

  • Joined

  • Last visited

Everything posted by Jwosty

  1. 0.3.0 Alpha is released, which adds a very simple Goa'uld base worldgen (a stargate, some transporter rings, appropriate loot, lots of gold), as well as a couple of minor tweaks.
  2. Even thought there's only a slow trickle of subforum requests, it's still a trickle. IMO, this thread still belongs.
  3. If you intend to do something whenever a player right-clicks a block, use PlayerInteractEvent.
  4. Also try using a simple working mcmod.info file from some other mod (i.e. one that doesn't have dependencies). If it still crashes... well, we'll cross that bridge if we come to it.
  5. I might use world.getTileEntity(x,y,z) instanceof TileEntityChest
  6. The server doesn't need login parameters, so only add it to client configurations. You can also get that same menu by clicking the drop-down arrow to the right of the debug/run icons and selecting "* configurations".
  7. If I understand your problem correctly, I've had this exact problem before, too. My issue was that the entity's tracking range (specified in EntityRegistry.registerModEntity) wasn't big enough; changing it to a large value like 80 fixed it -- this means that players 80 blocks away will receive updates. In SP, it will just pause updating if the player leaves that range.
  8. What happens when you print the TE's class? e.g. ...println(world.getTileEntity(...).getClass())
  9. Do you mean like just vanilla lightning raining down from the sky, or zaps coming from the player to mobs? If the latter, you'll have to create your own entity.
  10. Have you set up your tile entity properly? Try putting a print statement in all of its constructors.
  11. Just released 0.2.0_alpha, which adds transporter rings, naquadah items, controller crystals, and crafting recipes for everything. Also, the MP no longer crashes but still doesn't work quite right.
  12. Yeah, but don't forget to register the instance with MinecraftForge.EVENT_BUS.register. It should then work.
  13. There are some great tutorials out there to get you started (e.g. Havvy's tutorials), as well as this board in general, and Google is your friend. The IRC channel #minecraftforge is always pretty active and friendly, so try there too! Have fun modding
  14. Read up on events; you're going about it in the totally wrong manner. To use an event, you don't subclass Event, you just have to write an instance method to take an event as a paremeter (e.g. EntityJoinWorldEvent or MinecartCollisionEvent), add the EventHandler annotation to it, and register an instance of said class with MinecraftForge.EVENT_BUS.register. For example, this logs every time a player goes to bed: // Just a normal Object subclass public class MyAwesomeClass { @SubscribeEvent public sleepyTime(PlayerSleepInBedEvent sleepEvent) { System.out.println("Goodnight!"); } } // Main mod class @Mod( ... ) public class AwesomeMod { // ... @SubscribeEvent public void init(FMLInitializationEvent) { FMLCommonHandler.instance().bus().register(new MyAwesomeClass()); } } That should be enough to get you started.
  15. The basic idea is to have a plain text file served from some stable URL. Since I use Github for my project's source code hosting, I would have a file in the top level directory, calling it, for example, version or something. So if my mod's repo were at github.com/jwosty/MyAwesomeMod , the plaintext version file would probably be at raw.githubusercontent.com/jwosty/MyAwesomeMod/master/version . Here's a mix of pseudocode and actual Java code (you'll have to look up how to do the pseudocode things): public class VersionChecker implements Runnable { public void run() { string latestVersion = magicMethodToDownloadURI("http://raw.githubusercontent.com/jwosty/MyAwesomeMod/master/version"); if (!lastestVersion.equals(CommonProxy.Version) { magicMethodToAddClientChatMessages(CommonProxy.Modid + " is currently out of date; the latest version is " + latestVersion + ", and the currently installed version is " + CommonProxy.Version + ". Please download and install the latest version."); } } public VersionChecker() {} } It's important that it's implemented in a Runnable, because that will create its very own fancy thread when used like this: @EventHandler public void postInit(FMLPostInitializationEvent event) { Thread versionCheckThread = new Thread(new VersionChecker()); versionCheckThread.start(); } Haven't verified this code for compilability yet but it should probably work alright.
  16. Ok, this is pretty freaking awesome. I like it. A lot.
  17. canRenderInPass(pass) should _not_ always return true -- you only want it to be able to render in pass 1 (not pass 0). Use this: @Override public boolean canRenderInPass(int pass) { return pass == 1; }
  18. mode = (mode + 1) % max has the same effect, but is much shorter and more readable IMO. It's just a modulo (remainder) operation, which wraps around.
  19. You might have to write your own block renderer. Could be wrong though.
  20. Use world.markBlockForUpdate on the server to, well, re-send the block and it's tile entity to every client.
  21. Jwosty

    Git setup

    Well, there _is_ the GitHub GUI for Mac/Windows/Linux, but it's pretty limited. Personally, I prefer the command line :P
  22. Look at the Minecraft source. Take a good hard look. You'll find out how to do it.
  23. Jwosty

    Git setup

    Initializing a Git repo and setting up a remote branch from the command line is pretty simple: $ git init $ git add . $ git commit -am "first commit" $ git remote add origin https://github.com/user/repo $ git push -u origin master Now, if you're talking about a Forge project specifically, it's a bit more involved, but not too bad either. You could have a look at my repo for an example.
  24. Very early and buggy download added. Use with caution!
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.