Jump to content

Recommended Posts

Posted

Hello,

 

You should check for par3World.isRemote == false before you spawn, because you spawn it on the client and the server side and on the client side it's not moving.

 

So your code should look like this:

 

 


if (par1World.isRemote == false)
{
       EntityDragon asshole = new EntityDragon(par1World);
                 asshole.setPositionAndUpdate(par2, par3 + 10, par4);
                 par1World.spawnEntityInWorld(asshole);
}

 

 

Also, i changed the setPosition to setPositionToUpdate, i don't know if it's necessary, but i do it like this and it's working like a charm.

 

I hope i helped.

 

ss7

You sir are a god damn hero.

Posted

You sir a a god damn hero. I had no idea that method existed looked high and lowq for something like that too. And could you explain the par3World.isRemote == false a little bit more. Sorry i'm brand new to modding.

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.