Posted November 10, 201311 yr I manage to spawn the mob in by placing the block but when i do it spawn 2 entities and one of them has no AI and doesn't move. Here is the Code : http://pastebin.com/vCZYnAst
November 10, 201311 yr 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.
November 10, 201311 yr Author 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.
November 10, 201311 yr Hi The client/server side is pretty important to understand. These links might help... http://greyminecraftcoder.blogspot.com.au/2013/10/the-most-important-minecraft-classes.html http://greyminecraftcoder.blogspot.com.au/2013/10/client-server-communication-using.html -TGG
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.