Jump to content

Ernio

Forge Modder
  • Posts

    2638
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Ernio

  1. If you could just give error log, would be helpful ;p
  2. I'd go with standard debugging procedure. Comment out everything in your mod (at most basic level - registy) and add one after another. 1st I'd check events (if you use any) then go with item registration and rendering. There is not much to say to help you, are you sure you are not using anything in RenderGameOverlay? How are you drawing your gui?
  3. No wonder if you are putting NULL to RenderItem: Code: public RenderSnowball(RenderManager p_i46137_1_, Item p_i46137_2_, RenderItem p_i46137_3_) You: new RenderSnowball(Minecraft.getMinecraft().getRenderManager(), ItemReg.bomb, null) You need to Minecraft.getMinecraft().getRenderItem()
  4. You must have done something REALLY bad in rendering code. What rendering events are you using? Codes? Probably forgot to reset GL state or some blending mode.
  5. On client? MouseEvent and event.setCanceled()
  6. Chat message? player.addChatMessage(new ChatComponentText("Text")); or any other component.
  7. Make sure you are enabling/disabling all GL states to state they should be (were before drawing). I'd need code to tell you exacly where (it's all about order).
  8. I know you are very HAPPY to KILL, but that doesn't mean you need to DESTROY everything My input: Better use events (as diesieben said).
  9. I was looking into it some time ago, so it might have been changed, but it might be the server that actually decides about your attack. Cancelling it on client won't do anything since server still receives packet that you clicked mouse in particular direction, and the server will manage that click on it's own, so you will still attack. You would have to intercept MouseEvent get entity under mouse (MovingObjectPosition I think) and cancel MouseEvent client-side before anything happens.
  10. "there is nothing wrong with you using it, provided with you knowing what you are doing." I know how it works, I simply don't want to store useless values on server side. SanAndreas - this is exacly what I needed to know (that you can't initialize those values). This closes issue
  11. Consider this: I am using per-entity client value to make per-entity smooth health bar transition. Clearly getting error: Caused by: java.lang.NoSuchFieldError: lastTickHealth When mod is ran on Dedicated server (on client works just fine). My question is - what "fact" (piece of code) is not allowin this to be? IEEP clearly doesn't like SideOnly, but why? EDIT: Oh and SideOnly on methods is perfectly fine, IEEP only crashes when SideOnly is used on FIELDS (like in exception I have above).
  12. Damagesource is damagesource: target.attackEntityFrom(DamageSource.fall, 10.0F); This will deal 10 fall damage. You can use vanilla damagesources or make your own.
  13. Main idea is: You save fields inside your own storage (event class for example). Initialize them inside GuiScreenEvent.InitGuiEvent by checking if event.gui is instance of gui desired. And then draw those elements in GuiScreenEvent.DrawScreenEvent, do button actions in GuiScreenEvent.ActionPerformedEvent.
  14. I didn't read your code, BUT: You don't need events for CUSTOM things, events are to change vanilla behaviour. If you have your own sword class (which I assume you do) you can override a method hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker). Oh, and since that doesn't answer your main question, here it is: target.attackEntityFrom(source, amount)
  15. I have no idea what you are talking about. I am almost certain you setup your workspace incorrectly: Check this out: http://www.minecraftforge.net/forum/index.php/topic,14048.0.html#post_update_forge Short: Download forge src and run setupDecompWorkspace then eclipse (or other)
  16. 61352151511 Thanks, that removes one packet and command from my mod The more you know. First time I saw someone correcting Diesieben
  17. The statement should be other way around: When entity is setDead() the instance is being removed and it's NBT won't be saved to world's data. Could you please provide FULL code. Github would be nice. SAving data to something that won't be saved is radical and will not work.
  18. On server you can cast EntityPlayer to MP. On client you use Minecraft.getMinecraft() instead. (obvious unnecessity is obvious).
  19. Reading your posts always leaves me thinking - who taught you english (because of gramma) Anyway - to test mod you can simply launcher offline mode server and 2 clients from your eclipse (with different nicks). As to your guns - you are probably not using NBT values, but Item singleton values or using some packets that cause everything to screw up. Remember - never use global values if you want effect to be per-player.
  20. What you did is really unnecessary and shouldn't be done. It's literally reinventing the wheel. Use IMessage and MessageHandlers. Diesiebens tutorial covers it perfectly. For some examples and explanation (longer tut) http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-x-1-8-customizing-packet-handling-with
  21. Well, if you don't want to use PotionEffect then you will certainly need to make your own. Obviously - subscribe to events that suppost to launch your effect - e.g player tick, make IEEP which will hold map of effects and run them everytime you want. For fatigue - probably subscribe to some mining speed event, check there if IEEP of given player has your effect and increast time needed to mine block.
  22. Forge will ONLY run on clean version of MC. Using Forge = only base edits you can do is ASM/Reflection. If you want to make a private mod you can simply setup an MCP without forge, but then it will be not compatybile with Forge (obviously).
  23. http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-2-customizing-packet-handling-with OR simple/short: http://www.minecraftforge.net/forum/index.php/topic,20135.0.html IMPORTANT In 1.8 there are 4 threads (not 2 like in pre-1.. Server, Client and two netty (for server and client). Because of that you might have problems if e.g server constructs entity and will send packet to client, but client won't be able to apply changes on entity because it hasn't constructed it yet. To avoid that create new Runnable and throw it into mc main thread: Minecraft.getMinecraft().addScheduledTask(Runnable);
  24. You don't need .json - this is if you wanted to make some models maybe. You need to learn OpenGL. This is strictly java, not forge stuff, so without proper preparation I wouldn't ask here for others to write code for you. If you don't want to you can copy arrow and bind its textures to your own, OR just use arrow renderer.
  25. http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-2-customizing-packet-handling-with Probably all you need to know. Also - to store data about player - use IEEP: (2nd post in thread): http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571567-1-7-2-1-6-4-eventhandler-and
×
×
  • Create New...

Important Information

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