Posted May 22, 201312 yr When I spawn a entity, in this case a Blaze, it also appears another Blaze but I can't do anything to it. It only disappears when I reenter in the world. Any help? public boolean onBlockActivated(World par1World, int x, int y, int z,EntityPlayer par5EntityPlayer, int par6, float par7, float par8,float par9) { EntityBlaze blaze1 = new EntityBlaze(par1World); blaze1.setPosition(x, y+3, z); blaze1.spawnExplosionParticle(); par1World.spawnEntityInWorld(blaze1); return true; }
May 22, 201312 yr Author Hint you only need to run it on the server side. Already tried that. It happens the same, except the ghost goes into the ground and some time after killing the real entity the server crashes.
May 22, 201312 yr Use a packet. Make that packet spawn the entity server side. Though I am questioning if it should be server side. If it needs to be server side, then use a packet. I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes. I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there
May 22, 201312 yr I had it working for a bit of time on a redstone activated spawner. Packets are generally a good idea to sync the server and client. Which seems to be the case here. If there is a "ghost entity" that would be (I think) the server thinking there is an entity there, but the actual client is making the entity without letting the server know the entity is made... Just a plain ole me rambling on This may or may not be the case... I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes. I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there
May 22, 201312 yr Author I had it working for a bit of time on a redstone activated spawner. Packets are generally a good idea to sync the server and client. Which seems to be the case here. If there is a "ghost entity" that would be (I think) the server thinking there is an entity there, but the actual client is making the entity without letting the server know the entity is made... Just a plain ole me rambling on This may or may not be the case... Thanks, I'll try that latter
June 7, 201312 yr Author no need for a packet here. Use world.isRemote to check if you are on the server or client. world.isRemote == true => client I fixed it today with that, and only saw your reply when I was closing this thread, thanks anyway
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.