Ending creating IC2 weapon

  • Some questions (yep, again, google didn't help :P):

    1)How can i update damage-indicator (green/orange/red line under item), because when i'm discharging item (by method ElecticItem.manager.use(...)) it's discharging correctly, without previous problems, but line still stay at one position :D

    code: https://yadi.sk/i/ZGDc__ZJ3HGLmm

    2)Why OnImpact in EntityThrowable don't react on entities? (i need players, not all entities, but not important) or something other react? now my projectile explodes only when hitting block (or timer in object goes to 0, but not important, again)

    3)How can i add some untouchable model to entity? like this: http://vignette2.wikia.nocooki…/latest?cb=20150508024241 (sphere with my own texture, animated will be perfect)

    4)like in 3, but to entityThrowable (now it's just a small (about 1/8 of block) white cube)


    I tried to google, really, for 3-4 it gives some answers, but i can't understand it and mechanics from code, for 1-2 google gives nothing, maybe because i'm writing wrong request, or just nobody asking something like this before (don't think so)

  • Sooooo... i.. really, i don't know why, but i founded right now, while writing other mod (ordered), i added custom HUD and now line is changing always, so now only 3 questions left :D

  • My Errors found.

    1: ElectricItem.manager.use() has a buildin chargeFromArmor call. So useless.

    2: You spawn the Entity on the client side so it has on servers no effect.


    My answers to your question:

    1: Custom IItemRender class with the draw call. From what i know Quantum Pack (the version i link to in my version) has a OpenSource renderer. That didnt change between 1.6.4 to 1.7.10

    2: Check my found errors.

    3: i think there is a function called canBeColided with or something. But that removes all Interaction code from other entities so you have to do that yourself then.

    4: read 3.

  • 1) it's already solved, message about that above

    2) i don't understand how works server-client dividing, so i just try to write "if (!curWorld.isRemote)" before spawning of bullet, but bullet just don't spawn

    3) i meant i don't know how to simply add some kind of model to entity, how to create this model, where save it (3D max? i have experience of modelling, but i don't think minecraft accept this), like your (IC2) laser of MiningLaser item

    making this model untouchable is last part of problem)

    4) okay, i agree, unnecessary question, at all it's extends entity too, so solving will be like in 3, but still need to solve 3

  • 1: ok.

    2: Did you register your Entity? Because when you spawn a Entity on the server and you didnt register it it will not spawn on the client. Minecraft automaitlcy spawns Entities on the client when they are spawned on the server. And if a Entity is on the client it can actually only see what you see, when its on the server it can see what is on teh server and things you actually maybe can not see.

    3: Entity Renderring allows you to render with OpenGL how you want to render things. You dont need a finalized model to render everything. Thats just there to make simple shapes easier to do but complex stuff is PureOpenGL renderring. So yes its possible but i am not as advanced with openGL to do those kind of things. I can do simple shapes with PureOpenGL but anything complex like you want is for me impossible.

    4: ok

  • 2: Did you register your Entity? Because when you spawn a Entity on the server and you didnt register it it will not spawn on the client. Minecraft automaitlcy spawns Entities on the client when they are spawned on the server. And if a Entity is on the client it can actually only see what you see, when its on the server it can see what is on teh server and things you actually maybe can not see.

    how to register? i know only curWorld.spawnEntityInWorld

  • When your mod gets loaded you have to register the Entity in the GameRegistry. If you dont do that then your Entity cant spawn in the client world because the server doesnt know what the Entity you spawned is. I mean you have to do that with items/blocks too how do you think server-client connection works?


    Its not like the server-client magicly know what they do next to each other. No there is communication between those two. And they have to use ShortCuts to prevent that to much data is beeing used. Thats why you need to register these Entities/Items/Blocks/TileEntities etc. Because else those don't know what the other side is doing.


    I seriousely would look into other mods code (even Exp is good enough for that shit) to look how they did the Entity things. I mean every single Aspect of it not just spawning. I mean use a Decompiler or look on github and search for all references that these EntityClasses have. Its really important to know what you are doing.

  • When your mod gets loaded you have to register the Entity in the GameRegistry.

    ok, i need to register.. i tried.. even can't. how to register Entity or EntityThrowable (my bullet and afterbullet effect) if there (in GameRegistry) only registerTileEntity? i open this class, it even not somehow connected with Entity

  • Yeah there is no code for that in the GameRegistry, becuase i forgot which class it has. Now afterwards i found it.
    EntityRegistry.registerModEntity(EntityClass, IndexfromYouMod, ModInstance, MaximumTracked, updateRate);


    Learn how to search for things... Thats important.

  • Yeah there is no code for that in the GameRegistry, becuase i forgot which class it has. Now afterwards i found it.
    EntityRegistry.registerModEntity(EntityClass, IndexfromYouMod, ModInstance, MaximumTracked, updateRate);


    Learn how to search for things... Thats important.

    my head is blowing up now, i readed this 3 tutorials:

    https://github.com/coolAlias/F…ringCustomItemEntity.java

    http://www.minecraftforum.net/…echguys-modding-tutorials

    http://www.minecraftforum.net/…tem-with-throwable-entity

    about 5-7 times, do everything they saying (not at once, of course), but when i trying to shoot entityThrowable, minecraft kicks me out from game to menu with that text: "A fatal error has occured, this connection is terminated"
    I can't think today anymore, sorry for that, but can you tell, how to register this ...(lots of curse words)... entityThowable? i'm desperate.

    if you need my code of: Main class, item to shoot class, throwableEntity class or client/server proxies classes, tell here what of that you need, i upload somewhere and write source here

  • I cant help you making your mod i have already a large sized mod that has enough workrequirement on its own.

    https://github.com/coolAlias/F…ustomItemEntity.java#L221

    There you have your registry. You dont need to register SuperClasses or BaseClasses that you extend. You just need to register the highest class in the herachy that is spawned because thats the most important one.


    And yeah your mind is exploding now. I can tell you something really interesting:

    I concider myself still as a noob in Programming/Minecraft Modding.

  • Yes, I see it, I try it and still when I shooting(spawning entity by right-click item) minecraft kicks me out to menu

    Of course I will continue trying today, but now I still can't understand why it not works

  • Then post a crashlog then i might can help

    And yes it throws a error/crashlog even in that scenario

    that the problem, i tried to find crashlog, but it didn't throws it, just kicks to menu, seriously, folder "crash-reports" is still empty after i deleted all crash-logs and make this error again (launch mc from eclipse, enter world and try to shoot with weapon)

  • -.- you really dont know how to program. You are in the realy really really really really really early stages of learning to program right?


    I told you it generates crashes even your case. But since the game doesnt crash it doesnt create a file in the crashfolder.

    The crash will be found in the normal log. Because Minecraft even if it is stupid sometimes has at least some crash preventation systems that just throw a error log into the normal log.

  • -.- you really dont know how to program. You are in the realy really really really really really early stages of learning to program right?

    i'm programming soft and games on C# about 5 years, but this (java and minecraft) is rare shit hard to understand

    I told you it generates crashes even your case. But since the game doesnt crash it doesnt create a file in the crashfolder.

    The crash will be found in the normal log. Because Minecraft even if it is stupid sometimes has at least some crash preventation systems that just throw a error log into the normal log.

    ok, i'll search for this logs and send it here

  • i wonder is there no RayTracing of Issues in C#

    I mean as a programmer you need to learn how to raytrace issues.

    I mean you can ask people to help you but you are lucky that Aroma and i did decide to help you with these things.

    But if you decided to go to forge or something and ask for help then you would most likely go away from modding because they don't help.

    They usually just bullshit you. That happend to me at least. And i learned the hard way how to do it my own.
    If there is a issue i cant find instantly i do raytracing to understand how these things work or look into other mods why they cause the issues with my current system. Thats a way to fix them.

  • i wonder is there no RayTracing of Issues in C#

    I mean as a programmer you need to learn how to raytrace issues.

    I mean you can ask people to help you but you are lucky that Aroma and i did decide to help you with these things.

    But if you decided to go to forge or something and ask for help then you would most likely go away from modding because they don't help.

    They usually just bullshit you. That happend to me at least. And i learned the hard way how to do it my own.
    If there is a issue i cant find instantly i do raytracing to understand how these things work or look into other mods why they cause the issues with my current system. Thats a way to fix them.

    don't hear "raytracing" before, it's debugging or what?
    my problem is i haven't experience of work with already existing big projects like minecraft, everytime (on C#) i writed something from 0, or using engines, like Unity, so that problem gives result of unknown of project (mc now) possibilities (like functions, algorithms of rewriting mechanics e.t.c.) and nothing about this i can find in google (yep, i tried a lot before going on this forum), i know my questions is really stupid maybe for you, because you understand how it works, but i'n not and nowhere i can get this understanding

  • You know you can find the whole MC Sourcecode in the "yourEnvioment/build/tmp/recompiledMC/sources/net"

    raytracing is the word i use for: going back to the top of a function call. Meaning back to the first step of why its getting called and where.

  • You know you can find the whole MC Sourcecode in the "yourEnvioment/build/tmp/recompiledMC/sources/net"

    raytracing is the word i use for: going back to the top of a function call. Meaning back to the first step of why its getting called and where.

    oh, like going to classec where functions writed and read this functions? i already do this, but i can't go to class by function i don't write and i can't write this function if i don't know it, so i don't know it if i don't go to this classes, it's circle. and to brake it i need information from outside.

    i already read lots of classes, but i can't read all the MC and take all it possibilities to my head, it's physically impossible (i mean brain can't remember so much at once), so we again gets only 1 output from this problem: getting information from outside