Jump to content

vroominator

Forge Modder
  • Posts

    171
  • Joined

  • Last visited

Everything posted by vroominator

  1. I know this isn't going to be helpful in the slightest, but I noticed System.out.println("fhbdjsf"); So glad I'm not the only one who does that
  2. Silly me. Added in a null check and all is working fine. Thanks lex.
  3. Well Hi there. Recently, I've been getting a NullPointerException whenever I press a button in my gui and I'm not entirely sure why. Here's what comes out in the console: My tile entity: This exception doesn't seem to hinder gameplay at all, but it's probably not a good idea for my mod to be pumping out exceptions all the time, so I want to fix it. Anyone know what's happening here? If you need more info, just ask.
  4. Somehow I managed to get it working on my own. Woot
  5. I changed the question a bit. I think what I'm asking is a bit clearer now.
  6. Time for what's probably a noob question! I've never worked with multiplayer modding before, and have no idea how I'm supposed to get packets working. I noticed there's a packets and channels section in the wiki page for updating to 1.3, but there's nothing in there. Any idea when that's going to be done? In the mean time, I'm trying to set up a gui that handles a custom crafting thing for my mod. When a button is pushed in the gui, the container looks at what's in the two core slots and writes some NBT stuff to the itemstack in the wand slot. How should I make this work? Should the button send off a packet to the server, where all the crafting stuff is done, and then send a packet back with the finished product? if so, how would I go about doing this with what I currently have? If any of my code is needed, here: (Just a warning, I'm a messy coder, so prepare your eyeholes) GuiWandCrafting.java ContainerWandCrafting.java The addWandMod method from SorceryHelper Tell me if there's any more information you need. Thanks EDIT: Changed the question a bit.
  7. I'll show you how I did it. In your common and client proxy (I'm assuing you have these. If you don't, read this tutorial) add a method for registering sounds, I called mine registerSounds. Inside registerSounds in your client proxy, put this: MinecraftForge.EVENT_BUS.register(new ClientEvents()); replace ClientEvents with the class you're about to set up with your sound register stuff. Make your new ClientEvents class inside the client. Put this in it: package etopsirhc.mods.tremmorCraft; import net.minecraftforge.client.event.sound.*; import net.minecraftforge.event.ForgeSubscribe; import net.minecraft.src.*; public class ClientEvents { @ForgeSubscribe public void onSoundsLoaded(SoundLoadEvent event) { SoundManager manager = event.manager; String [] soundFiles = { "gun/click.ogg"} for (int i = 0; i < soundFiles.length; i++){ manager.soundPoolSounds.addSound(soundFiles[i], this.getClass().getResource("/etopsirhc/mods/tremmorCraft/" + soundFiles[i])); } } } finally, add proxy.registerSounds(); to your pre initialization method in your mod class, and that should be it. I only just found out how to do this, so I thought I'd share it with you. If you ever want to add more sounds, just add them to the list. I'm probably doing this in a really inefficient way, but I'm a noob, so cut me some slack
  8. I'm planning on adding in ore gen to my mod sometime soon, so if I find a fix, I'll let you know.
×
×
  • Create New...

Important Information

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