Posts by Nordicus666

    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

    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 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

    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)

    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

    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

    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

    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

    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

    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)

    itemStack.writeToNBT() puts the ItemStack on NBT to be saved to disk. itemStack.readFromNBT() reads it again (from disk). You do not want to use these functions. What you do want to use is itemStack.stackTagCompound (make sure to do a null check before you use that and initialize it if it's null). THERE you can store and load your values.

    THANKS, no, really, thanks a lot! first, i make what i want, second (that really important) i understand how i works! my thought was really near to real situation, i just used what i don't need to use! thanks again, because now i can use this anytime i need it))

    The problem is still relevant

    i still can't understand, how i can work with itemStack.writeToNBT and itemStack.readFromNBT

    first i think NBT it's something like universal array of fields, like every itemStack have own NBT and we can just insert in this NBT new field with name FIELDNAME (itemStack.writeToNBT("FIELDNAME", FIELDNAME_value);), but we can't, at least i can't understand why WRITE returns NBTTagCompound and why READ don't returns

    my code (just tried to understand, by writing algoritm bases on my thoughts): https://yadi.sk/i/_ivrok6U3HF7j2

    Hm.. okay, understand, but still don't understand what is NBT and how i can work with it (yes, i read from site, NBT it's something, that saves in damage line of item or something like this, but nothing else and this give me nothing)

    I read something from this site: https://bedrockminer.jimdo.com…etadata-blocks-and-items/

    and, as i understand with my knowing of Eng, it's like item item, maded from one class have different states, but i just need to save somewhere "long lastTimeUsed" to every item, so different instances of my item in inventory(ies) of player(s) will have different value

    for this: if one player crafts two of this item, use one (and it will be on cooldown, so he can't use it at last "float cooldown" seconds), he can switch chosen slot and use another one and it will work (simply i was thinking item's in inventories working like instances of objects in OOP languages, like C#)

    Question. Why dont you store the LastTime used in the ItemNBT?

    Then you compare the current time with the lastTime item used. So you can compare it better. And that allows you also to support fakePlayers.

    i don't even know what it NBT in minecraft and how it works, but i founded my cooldown system (i don't know why) works on every player gun, so if player will shoot from this gun, take other this gun (have 2 of this in inventory) and try to use second, he can't, cooldown is static for every gun of this type (don't know how about different players, but for one player it works like this)

    Ok, I'll try to debug when comeback home, but I don't know how it helps because I don't how IC2e mechanics works

    About shape: I still haven't work with minecraft much, so I can't even imagine how to do something you discribed, can you give examples? With comments will be best

    Try either discharging it on both sides or sync the inventory after discharging.

    Already tried first, then it discharging, but line show true value at (i think) one tick and come back to full filled line on next tick.

    about sync, i don't know how to do it and tried find something about it in possible methods (curPlayer.*), but didn't find anything helpful

    You should rely on the tick counter rather than the system time and use a per-player rather than per-item counter (itemstack nbt would probably work as well). But don't know a full system that does that right now.

    you mean something like "TicksExisted"? can't find something like this

    You should basically do all the logic and world changing things on the server side (!world.isRemote) and the visuals on the client (world.isRemote).

    If you entity doesn't show up now, where you have the code only executed on the serverside, it's probably not syncing properly (I don't know much about entities myself, but random guess: did you register your entity properly?).

    register item too easy for doing it not properly)


    Item staticGun = new ItemStaticGun();
    GameRegistry.registerItem(staticGun, "StaticGun");

    and i separate logic and view part, now it's discharging properly, buuut.. now changing charge didn't displaying (line under item don't gets shorter)

    new, separated code: https://yadi.sk/i/oE_e8Zvf3H8Sp5