Jump to content

Recommended Posts

Posted

What I wish to do is get the current EntityLiving and find out which World  it is from.

 

I have looked trough the available functions for enemy and player but have not found anything that can give me the World object it is in.

 

I am stumped.

Item.class

public boolean hitEntity(ItemStack item, EntityLiving enemy, EntityLiving player)
{
item.damageItem(1, player);
return true;
}

Posted

Just opened eclipse and wrote this line:

EntityLiving el = new EntityLiving();

 

Then i did this:

el.

 

and scrolled trough the list I got over stuff I can access from the EntityLiving object, which gave me this result as a likely solution:

 

el.worldObj

 

If you guys dont get it.. then well ya.. try harder...

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.