Jump to content

Zetal

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by Zetal

  1. @Ives The @Override annotation is purely for Eclipse to notify you if the method you're attempting to override doesn't exist. It adds no 'real' functionality. It's useful, but won't solve this problem. @BlueGhast90 It sounds like you aren't registering all of the icons, then. I would recommend adding a System.out.println message for this.getUnlocalizedName().substring(5)) + "_" + N This part to see what exactly you're attempting to register. I'm not completely familiar with what the substring(5) is doing, so that's kind of worrying me. Sorry!
  2. Could you post that method? I'll look at it tomorrow. Going to sleep. Night!
  3. That's...really weird, but I don't know what's causing that. It shouldn't matter TOO much, though... for now, comment it out and do the other stuff I told you. I need to get to sleep, though. If all of the icons are rendering correctly, then look into the ItemBow class, and look for any obvious discrepancies. Good luck.
  4. Do you mean public ItemStack onItemRightClick(ItemStack item, World world, EntityPlayer player)? Or is there another method that I'm missing?
  5. Well, "method" is a coding term... but, besides that, the 'Icon' is the image you're updating so that the bow appears to be animated. At least, that's what it seems like. All the way at the bottom, where you return different azulBow[#] icons, add return azulbow[3]; at the very top, so that only that returns. Change that 3 from 0-3 and run it every time you change it, and see what happens. if the bow ever stops rendering entirely, tell me. Now, you say that updateIcons has an error..? If it's a problem with a 'parent' class, you should move the @SideOnly(Side.CLIENT) down a line, beneath the azulBow[] variable.
  6. Where is takePhoto() referenced? You shouldn't ever really have to update the inventory when adding an itemstack to a player.
  7. Try replacing mineCraft.thePlayer.inventory.addItemStackToInventory(new ItemStack(ObscuraCraft.icamera)); with this instead; player.inventory.addItemStackToInventory(item1); I /think/ that's what you're looking for. Let me know.
  8. Okay, thanks. Just wanted to verify that it wasn't something silly. Firstly, you should add super.updateIcons(par1IconRegister); inside the updateIcons method. See if that fixes it. Even if not, you should probably keep it. Next; At the bottom, where you set the default Icon? Swap that out with one of the textures that isn't appearing. It's possible that the icon you're trying to switch to isn't actually registered, and might not appear. If that's the case- you've found your problem. If not, start adding println messages in areas you think might be causing the problem- the more information you can gather, the more likely you'll be able to solve the issue.
  9. Could you show me the new code you're using? I'm not a psychic!
  10. Well, yes, I was hoping for the Timing numbers. Could you tell me what those are?
  11. You should use this instead: this.inventory.addItemStackToInventory(YOURITEMSTACKHERE); The code that you're using is designed to change which item a player has 'selected' at the time. The above will actually add it to the inventory. In order to use it, you'll need to create a new ItemStack object using whatever parameters you need. An inventory object only ever takes 'ItemStack' objects into it's slots, not items.
  12. In the quotations? What do you mean? If you mean you get an error in the Eclipse console, that likely means that the variable 'stack' is null. Otherwise, please explain what you mean.
  13. What do you want that method to do?
  14. I've never actually done any work with bows, but my first instinct would be to add System.out.println(time); underneath this line int time = stack.getMaxItemUseDuration() - useRemaining; then check the message that prints out in the Eclipse console.
  15. I'm glad to hear it. =) Keep on modding!
  16. I'll look through that code to see if there's anything obvious. In the meantime, you can run a server in Eclipse by clicking the dropdown arrow next to the normal 'Run' green arrow in the top left and clicking 'Server'. I can't imagine how awful it would be to code servermods without that. =P With the changed registration, does singleplayer still function?
  17. What do you have inside of your ServerChatEventHandler()? By the way, for the sake of time, I recommend testing the server portion of the mod by running the server in Eclipse (or whatever you're using for editing). This saves time that you would have used for compiling and stuff.
  18. I could be wrong, but it seems a lot like you're registering your eventhandler only on the client. @ServerStarting public void serverStart(FMLServerStartingEvent event) { server = event.getServer(); MinecraftForge.EVENT_BUS.register(new EventHookContainerClass()); } In general, you should have two EventHookContainerClass, one for Clients only and one for Servers only. Good luck!
  19. Hey All, Been trying to add a custom sound using Forge for several hours now, and it keeps throwing the same error. event.manager.soundPoolSounds.addSound("spec/levelup.ogg", new File(mc.mcDataDir, "resources/sounds/spec/levelup.ogg")); @PreInit public void preInit(FMLPreInitializationEvent evt) { MinecraftForge.EVENT_BUS.register(new ClientEventHookContainerClass()); } this.worldObj.playSoundAtEntity(this, "spec.levelup", 0.85F, 1.2F); And for the sake of all that is good, please don't ask me to "check if the file is actually there." As if I haven't already. The file is located within the minecraft jar is the resources/sounds/spec directory, yet for some reason it consistently says that the file cannot be found, and mc.mcDataDir returns '.' Very strange. 2013-05-09 20:26:01 [iNFO] [sTDOUT] ERROR MESSAGE: 2013-05-09 20:26:01 [iNFO] [sTDOUT] C:\Users\Nope\Desktop\MCPGLOBAL\mcpLoMaSMod\jars\.\resources\sounds\spec\levelup.ogg (The system cannot find the path specified) Thanks for any help.
  20. Hey, I misunderstood the mods intentions ( I love when that happens) so apparently I'm supposed to just scan through all of the chests on the server. Does anyone know an efficient means of getting every chest? Even those in unloaded chunks?
  21. I'll probably just do it via coremod. I found a good place to try and add a custom hook, so hopefully that won't prove to be too difficult. My main problem with doing it based purely on the updateEntity event is that I need the person as well as the chest. Thanks for the help though. Good luck with your mods!
  22. I'm already a coremod, as this is for a single server that won't be working with anything else and I've had to make some...interesting..changes...thus far.. But I've already done 'placing/breaking' blocks using just events- in my zone protection mod. So I don't think it'll be a huge issue. @Reika: I was considering something like that if it absolutely came down to it, but I'm worried about the efficiency hit. I've already introduced several other things that have had minor detrimental effects on FPS, and anything that does a check every tick for every chest is a little worrisome. If it's not possible with events- is there anywhere in the core code that I should start at?
  23. I'm trying to create a mod that will keep track of all player actions, ie putting items in chests, taking items out of chests, picking up items, dropping items, destroying and placing blocks..etc. The last four seem pretty self-explanatory, for the most part (buckets excluded), but it doesn't seem that there is a way to actively get Chest events.
  24. I was hoping it would be a simple Forge Event check, but as far as I can tell, it definitely isn't. Has anyone does this before? Any tips on where I should start? --> Back to coding...
×
×
  • Create New...

Important Information

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