Jump to content

vilu

Forge Modder
  • Posts

    84
  • Joined

  • Last visited

Everything posted by vilu

  1. You really should try clean your code and use correct indentation, because it helps you to see what part some if-statement handles for example. and what is this about?? GL11.glPopMatrix(); default: break; case EQUIPPED: { Check all your brackets and fix your switch-loop.
  2. I can't figure out why your code doesn't crash my mod but it does yours. Oh, you should check that you are using the latest recommended version of Forge for 1.7.2.
  3. This is weird...I tried your customPacket.class and registered it same way as you do in my mod and it doesn't crash at all...
  4. If your packet handler is in same class as the packet, try register packet and handler like this: net.registerMessage(customPacket.customPacketHandler.class, customPacket.class, packetId++, Side.SERVER);
  5. If I think that client doesn't know population of village or number of doors, only server does so you need to get that from server side. You see, gui you open is on client side so if you get village info from gui (not from container for example which is in server side) you won't get correct info.
  6. You actually know what glPushMatrix does? It surely doesn't "init OpenGL". Yes I know it doesn't actually "init" openGL, it saves current matrix right? I just thought it's easier to understand that way...
  7. Why are you binding texture before initing open gl? I mean you should first init open gl with GL11.glPushMatrix and then do staff you want to do in your render...
  8. Try rendering it as two parts. First render normal size things and then scale and render smaller things.
  9. (on 1.7.* ) Create sounds.json file to your resources dir (assets/modid/sounds.json), define sounds to file (check original mc sounds.json file for help) and then let your mob sound methods return the String which you have defined in sounds.json, voila =)
  10. I have some problems with debugging because cpw.mods.fml.common.network.internal.EntitySpawnHandler.spawnEntity spams "Spawning entity on client" and then "Entity spawned on client" over and over again. Is there any way to disable that (other than commenting it or removing it, because I do not want to edit files outside of my mod package)?
  11. Thank you for your help =) Maybe I should use Tile Entity after all or modify the block model so that it doesn't need direction meta. I've tried to google information about packing data to just one nibble but it really seems to be impossible.
  12. I'm trying to avoid Tile Entities if it just possible (for performance reasons) and now I got stuck and can't figure this out by myself. I have this block and it has three things that needs to be stored, direction, state (on/off), and size (should be between 0 - 8 ). So how could I fit all this to just one nibble or can I? I've tried to do different bitwise operations and still it just doesn't work. I'm not so good at bitwise operations so therefore I thought that here is someone how knows better. Let's say there are flags for those things I mentioned, and if the flags were ones like below I could determinate state from meta by checking if ((meta & stateFlag) == stateFlag), and direction by returning (meta & ~ (hex) (flag) (bin) 0x2 - North (0010) 0x3 - South (0011) 0x4 - West(0100) 0x5 - East (0101) 0x8 - State on (1000) But how can I get size information from meta and what hex values I should use for flags? Please someone who understands bitwise operations better tell me if that's not even possible and if it can be done then how? If the size data (from 0 to 8 ) takes too much space in nibble (as it seems to take) then how many different sizes could be fit there?
  13. Ok do that. I'll check it out.
  14. Nope....Nothing is wrong there either... I really don't know what's wrong there because mine is working...check your directory structure one more time because your code should work and try adding debug line to your sound loader to see that your sound files are really loaded.
  15. mm....can you show me your extended ItemRecord?
  16. I'm running out of ideas...the only thing you haven't change is the way you use your sound loader. So try remove line SoundManager manager = event.manager because you don't need it. Just use: @ForgeSubscribe public void onSoundsLoaded(SoundLoadEvent event) { event.manager.soundPoolStreaming.addSound(MoreDimensions.modid + ":explosive.ogg"); //and so on... } ...to load your music disc. edit: And by the way...I'm registering my items in load, and sounds in preinit...just to let you know..
  17. Did you also remember to change manager.soundPoolSounds.addSound(MoreDimensions.modid + ":KsTBeats - Explosive.ogg"); to manager.soundPoolStreaming.addSound(MoreDimensions.modid + ":KsTBeats - Explosive.ogg"); (or manager.soundPoolStreaming.addSound(MoreDimensions.modid + ":explosive.ogg"); if you changed everything to lowercased) ..?
  18. Couple things that could effect.. MinecraftForge.EVENT_BUS.register(new SoundHandler()); so Class name (compilation unit) should be also SoundHandler (see your SoundHandler.java, line: public class SoundLoader ) Music discs should be loaded to soundPoolStreaming, not to the soundPoolSounds. You see, soundPoolSounds gets sounds from the directory /assets/modid/sounds/file.ogg and soundPoolStreaming from /assets/modid/records/file.ogg Also, I wouldn't recommend to use spaces in filenames..
  19. Ok then.. double check your directory structure because you won't get any error message to the console if Minecraft doesn't find your music file. Oh and another thing, I haven't tested any other formats than .ogg so I'm not sure about other formats.. Edit: Hey...can I see your soundloader because the problem could be there?
  20. I really think your mod directory should be lowercased...
  21. GOT IT =D Here's how: Extend ItemRecord like... public class ItemModDisc extends ItemRecord { public ItemModDisc(int id, String recordName) { super(id, recordName); this.setCreativeTab(CreativeTabs.tabMisc); this.maxStackSize = 1; } // Rest of your ItemRecord code... } Then to your main class, add your constructor with one change: modDisc = (new ItemModDisc(modDiscID, "your_modname_lowercased:moddisc")).setUnlocalizedName("moddisc"); Put your ogg to the assets/your_modname_lowercased/records and keep the name same as above (so my custom record is moddisc.ogg and path is then assets/my_mods_name/records/moddisc.ogg And load it the the soundPoolStreaming (in your sound load event handler) for example like this: event.manager.soundPoolStreaming.addSound("your_modname_lowercased:moddisc.ogg"); Note that you don't use folder records in handler because soundPoolStreaming is looking always from /assets/your_modname_lowercased/records like soundPoolSounds is looking from /assets/your_modname_lowercased/sounds And there it is, your custom record which works just fine =) edit: Little clean up for code because I copy pasted it without removing unneeded lines...
  22. I have same problem...let's hope we or someone else figure this out =/
  23. I'm not sure if this makes any difference but I think you should first register entity and then renderer.
  24. Thank you so much! I've been so blind... (/me feels stupid) When the 1.6.1 came out I fixed those EntityLiving parts that didn't work anymore and somehow missed these...It seems like I got source blindness =D
  25. I already have renderer, check below Everything was running ok (with 1.5.2 and before) when I changed setSize in EntityButterfly and also registered renderer with same size (like RenderingRegistry.registerEntityRenderingHandler(EntityButterfly.class, new RenderButterfly(new ModelButterfly(1.0F), 0.2F, 0.45F)); ) but now it just doesn't so I think the problem is somewhere else but thanks any way =) For Noah_Beech, I said this.setSize because I have this same problem with every entity when the size is anything else than normal..
×
×
  • Create New...

Important Information

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