Jump to content

Failender

Forge Modder
  • Posts

    1091
  • Joined

  • Last visited

Everything posted by Failender

  1. Btw did you ever checked if tick randomly gets Called? In 1.8 u need to use the setTickRandomly function to allow random ticks not sure about oder versions
  2. I dont really get what you Are triing to do. You say you want the block to spread horizontally. Why are you using the north /south etc blockpositions then? If you want it to spread horizontally just check the Block above, if its air replace it
  3. more details pls. what the problem wiht getDefaultBlockState. Maybe show the code that isnt working
  4. there is still no need to copy bad coding style you can do it better
  5. you should be creating your own GUIContainer and call that using a GUIHandler..
  6. Did you register the Generator? The int chunkX is the number of the chunk that is getting generated. Which is NOT equals to the xPos of the first block.. remember each chunk is 16x16 so some simple math will bring you there Besides that.. There are some things in your coding style which you should REALLY work on. Your method generateBacteria is returning a boolean. Which is ALWAYS true, and you arent event using that value. Why not make your method a void then? You have a a loop in your generateBacteria method which is defining a variable i1 as counter variable. But you are never using that variable. If u want to check if y>128 maybe you should use a while loop, so you dont define useless variables? Greetz Fail
  7. Hello everyone, I am triing to set the worldspawn to a predefined location , lets say 100,100,100. I want this to happen whenever a new game is created. I thought the best idea would be to use the FMLServerStartedEvent. Now the problem how do I get an instance of the overworld, where I want to set the spawn? Greetzz Failender
  8. always use the newest version of java if possible. the newest forge version seem to run no problem on java 8
  9. the question is: what is your goal? what do you want to do with that event
  10. i guess u are looking for a tickhandler
  11. Guess drakos way is better. I dont knew about that
  12. use on blockplaced. check if the block underneath is the block you want. if not destroy the block and give one to the player
  13. We cant help you if you dont show us anyhing. Just saiing. The chance that you get a NPE bc of forge isnt updated is really small.
  14. got it to work now, thank you jabelar! Just one thing for your tutorial you've got a thing you should really fix. In your messagehandler for the server side u should queue up the execution of the task to prevent server crashes. http://greyminecraftcoder.blogspot.com.au/2015/01/thread-safety-with-network-messages.html
  15. I guess I'll read that tomorrow as I am WAY to tired for that right now. Thank you anyway, Ill take a look tomorrow
  16. Well. The RayTrace seems to NEVER hit an entity, even if I am spawning a whole zoo around me. MovingObjectPosition pos = Methods.rayTrace(ext.getEntity(), 10f,1f); System.out.println(pos); if(pos!=null && pos.entityHit!=null) { System.out.println("call"); Entity entityHit= pos.entityHit; entityHit.attackEntityFrom(DamageSource.causePlayerDamage(ext.getEntity()), 2); } public static MovingObjectPosition rayTrace(Entity entity, double distance, float p_174822_3_) { Vec3 vec3 = entity.getPositionEyes(p_174822_3_); Vec3 vec31 = entity.getLook(p_174822_3_); Vec3 vec32 = vec3.addVector(vec31.xCoord * distance, vec31.yCoord * distance, vec31.zCoord * distance); return entity.worldObj.rayTraceBlocks(vec3, vec32, false, false, true); } private static Vec3 getPositionEyes(Entity entity, float p_174824_1_) { if (p_174824_1_ == 1.0F) { return new Vec3(entity.posX, entity.posY + (double)entity.getEyeHeight(), entity.posZ); } else { double d0 = entity.prevPosX + (entity.posX - entity.prevPosX) * (double)p_174824_1_; double d1 = entity.prevPosY + (entity.posY - entity.prevPosY) * (double)p_174824_1_ + (double)entity.getEyeHeight(); double d2 = entity.prevPosZ + (entity.posZ - entity.prevPosZ) * (double)p_174824_1_; return new Vec3(d0, d1, d2); } }
  17. So u mean the distance I want to cast, like 5 blocks, and what the heck is the partialTickTime
  18. I guess I got it. Only problem is, I am not sure what the two float values the method is taking do. public MovingObjectPosition rayTrace(double p_174822_1_, float p_174822_3_) It should be something with the direction the player is looking at, if im right. So it might be player.camerapitch/camerayaw?
  19. Hello everyone, I am triing to find the entity a player is looking at, on the server side. Any help would be nice Greetz Fail
  20. You sir are my hero. I was going retarded to find the error
  21. First of all, I am sorry to ask this. I have checked all my files, all my names, every thing four times. Still I am unable to find the place where i fucked up. I am registering a block. I am registering the renderer in the client proxy, I am calling the the proxy registerRenderer and I created all json files. Still it wont render [14:14:22] [Client thread/ERROR] [FML]: Model definition for location 1.0:vamp_one#inventory not found [14:14:22] [Client thread/ERROR] [FML]: Model definition for location 1.0:vamp_one#normal not found Main file ClientProxy assets.vamps.blockstates.vamp_one.json assets.vamps.models.block assets.vamps.models.itemn assets.vamps.textures.blocks.vamp_one.json is the position of the texture
  22. Yeah I see where this is going.. I guess this ways are just getting way to expensive to just disable the natural healing if one condition is true. I might make some runtime tests, but I guess I'll find another way then this. Still good ideas guys, thank you!
  23. take a peak in the ItemSword onItemRightClick method, your solultion might be liing there if I got u right
  24. Well. That sucks. I guess I need to find a work around for it then.. Guess my solution will be sth like save if the player is using a heal spell and save that in the extendeprops. Still thank you diesieben
  25. What do you mean with "it blocks his sword"
×
×
  • Create New...

Important Information

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