Jump to content

hydroflame

Members
  • Posts

    1511
  • Joined

  • Last visited

Everything posted by hydroflame

  1. we need your block code as welll
  2. alternativelly, ray tracing would also give good result
  3. thats my point, i tried with setting similar (my server has 1.5ghz of cpu speed) and my server is also running many more cpu related operation and it was working perfectly edit:i made 50 of those and registered them all, no problem
  4. checking that EVERY tick would be overkill kinda like always looking at the windows in case there's someone coming instead of waiting til you hear the door knock
  5. look at my secodn code, notice [glow=red,2,300]the variable names[/glow] ive change them to make thigns clearer
  6. use a class that extends IExtendedEntityProperties
  7. new to coding ? ok lets take it step by step double motionX = 20 * (double) (-MathHelper.sin(player.rotationYaw/ 180.0F * (float) Math.PI)* MathHelper.cos(player.rotationPitch / 180.0F* (float) Math.PI) * 0.4f); double motionZ = 20 * (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)* MathHelper.cos(player.rotationPitch / 180.0F* (float) Math.PI) * 0.4f); double motionY = 20 * (double) (-MathHelper.sin((player.rotationPitch)/ 180.0F * (float) Math.PI) * 0.4f); so heres my code, basicly it will calculate the translation on all 3 different axis double motionX = 3; double motionY = 3; double motionZ = 3; so this code would technicly tell the program "yo btw i have 3 variable, one called motionX and value of 3, one called motionY and value of 3 and a last one called motionZ and value of 3" now this does NOTHIGN on its own because all it says is "hey i have these values" it doesnt do anythign with them now lets take a look at your line of code player.motionY = 0.7; basicly this is saying to the program "btw buddy, can you take the "player" and take a look at its "motionY" value, and while you're there can you assign it the value of 0.7" now im going to write one of the 3 lines requires to make this work and youll write the 2 other public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { player.motionY = 0.7; double calculatedX= 20 * (double) (-MathHelper.sin(player.rotationYaw/ 180.0F * (float) Math.PI)* MathHelper.cos(player.rotationPitch / 180.0F* (float) Math.PI) * 0.4f); double calculatedZ = 20 * (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)* MathHelper.cos(player.rotationPitch / 180.0F* (float) Math.PI) * 0.4f); double calculatedY = 20 * (double) (-MathHelper.sin((player.rotationPitch)/ 180.0F * (float) Math.PI) * 0.4f); player.motionY = calculatedY; //another line of code for another axis //another line of code for the last axis return itemStack; }
  8. does forge detect circular dependencies ? (i know it shouldnt happen but what if modder set it up this way?)
  9. lolol, yes, its technily 0.4f but you could tottally remove it and it wouldnt change anything
  10. my teleport spell uses thsi double motionX = 20 * (double) (-MathHelper.sin(player.rotationYaw/ 180.0F * (float) Math.PI)* MathHelper.cos(player.rotationPitch / 180.0F* (float) Math.PI) * f); double motionZ = 20 * (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI)* MathHelper.cos(player.rotationPitch / 180.0F* (float) Math.PI) * f); double motionY = 20 * (double) (-MathHelper.sin((player.rotationPitch)/ 180.0F * (float) Math.PI) * f);
  11. hmmm, if you're using eclipse, try cleaning your project (Project -> clean... ) if that still doesnt work, try re installing mcp/forge again and restarting if THAT doesnt work its probably forge bug so use 1.6.1 or even 1.5.2 while this is being fixed, also, if you get to this step, report the bug to the bug board
  12. no an "empty" minecraft would have a null pointer exception on fontRenderer whiel you get a noSuchFieldException, tottally different are you using minecraft 1.6.x ? if yes they might have changed the location or name of Minecraft.fontRenderer wait that would mean it would fail at compilation time ... not at runtime .... if thats not it im afraid i have no idea :\
  13. heres what happening 1 your mod loads 2 amethyst mod loads because your mod is the first to load you get obvious problem of "well thsi doesnt exists" what you WOULD like to happen is that 1 amethyst mod load 2 your mod loads but afaik theres no way to set the mod load order what you could try is move all that code in the init() phase or even postinit() this way its possible that amethyst mod will be loaded when you get there and that the item Amethyst will exists
  14. well i doubt this will change anything, but try Minecraft mc = FMLClientHandler.instance().getClient();
  15. no thsi method is working its what im using for my mod. can you explain what are the mismatch/bugs ?
  16. hmm, i also got a question, not that everything has to be done in the pre-init, is there a way to change the load order of mods? in this case cant he simply change his itemstack creation to the init phase ? If the job HAS to be done during the preinit, like a item that is based off another item, what can he do to make sure that the other mod is loaded before his ?
  17. theres no hook for that you can make a PR
  18. ok 1 use code tag 2 try running this code inside renderItem if(FMLCommonHandler.instance().getEffectiveSide().isServer()){ try{ throw new Exception("learning to coding is important"); }catch(Exception e){ e.printStackTrace(); } }
  19. technicly this is caused by the fact that the server calls thsi method, code please ? use code tag too
  20. ok, I don't personally mind if its done that way because its actually a super easy solution, but it contains a mega annoying bug. @Guff, as long as you know what are the implication of coding it this way @op, guff 2nd code is the best way to go unless it looks too complicated and you don't mind the bug caused by his first implementation.
  21. look at this guide http://www.minecraftforum.net/topic/1892328-need-a-highly-detailed-152-guide/
  22. heu .... ... well ..... you need a class that extends ISimpleBlockRenderingHandler (or a name similar to that)
  23. yagoki wasn't i the one who helped you out with this ? when you were having 1 texture always all white (yes i admit you found the solution by yourself) if i'm talking about the same thing, then yes i approve that its a very good example.
  24. guff in which class is this code located ? on X entends Item? then you realise that the timer will "on cooldown" for everyone in the server right ? as there is only 1 isntance per item but multiple itemstack
  25. do you know what this function do ? that the function you call when you want to add +1 to the number of things this person has eaten... which honestly you dont care ... you could just remove it and it wouldnt affect the item (except that the game wont keep track of how many of this item you have eaten)
×
×
  • Create New...

Important Information

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