Jump to content

Recommended Posts

Posted

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);
        }
    }

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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