Posted June 16, 20169 yr I want spawn entity on block always. @Override public void updateTick(World world, int x, int y, int z, Random random){ if (!world.isRemote){ EntityMob entity1 = new EntityZombie(world); entity1.setPosition(x + 0.5D, y+1, z + 0.5D); entity1.setCurrentItemOrArmor(0, new ItemStack(Items.iron_sword)); world.spawnEntityInWorld(entity1); } }
June 16, 20169 yr Author And if the zombie walks off? If it gets killed? No effect, just give spawn on block
June 16, 20169 yr updateTick doesn't always fire. It's random, once about every 3-5 minutes, iirc. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
June 16, 20169 yr Author No effect, just give spawn on block What do you mean by "no effect"? New one gets spawned? No new one? Please be a bit more specific ... Easy, if we placed this block, this block will spawn zombie all the time. but updateTick can't do it. updateTick doesn't always fire. It's random, once about every 3-5 minutes, iirc. if updateTick doesn't always fire. what is always fire.
June 16, 20169 yr TileEntity Note: Don't spawn mobs per-tick with no condition. You will end up with 20 mobs per second that after probably minute would kill players around (in performance), and then server. YOU MUST have spawn conditions! 1.7.10 is no longer supported by forge, you are on your own.
June 16, 20169 yr Author Thank You Ernio, now i can do time by world.getTotalWorldTime() and give it spawn on time. I'll try it your way, if there is a problem i will come back comment this post if i do you puzzling, i'm sorry
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.