Posted August 1, 201213 yr I am really working in waters a lot of modders tend to ignore or avoid. Might as well get to the point, I am trying to get my mob to convert into a different mob. Yes it is a zombie like creature. zombie = (new EntityNuclearZombie(ModLoader.getMinecraftInstance().theWorld)); zombie.setLocationAndAngles(this.posX, this.posY, this.posZ, ModLoader.getMinecraftInstance().theWorld.rand.nextFloat() * 360.0F, 0.0F); ModLoader.getMinecraftInstance().theWorld.spawnEntityInWorld(zombie); This is the code that spawns the new entity and is surrounded by a if statement that check if the entity is dead. The if statement is in the onUpdate method. I have a boolean variable that determines if the creature converted. That makes sure the mob doesn't spawn a huge group of other mobs. What can/would I need to add to have it so it check the mob that attacked it? I know of the getLastAttackEntity method but I can't seem to get it to work. It either spawns a "zombie" all the time or never. http://www.slothygaming.com/img/ota.png[/img] If your grammar is shit and you blatantly don't know what you're doing, I will not help you.
August 1, 201213 yr Try checking out the creeper/skeleton code. They've got stuff that uses that. So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
August 1, 201213 yr Why don't you just spawn an entity and set the current entity dead? Simple. You can do that in the setDead() function. Override it if you need to. http://calclavia.com/uploads/banner.png[/img]
August 1, 201213 yr Author Already fixed it with what atrain99 said. All is good. The infection can spread http://www.slothygaming.com/img/ota.png[/img] If your grammar is shit and you blatantly don't know what you're doing, I will not help you.
August 2, 201213 yr Already fixed it with what atrain99 said. All is good. The infection can spread I actually fixed somebody else's problem?!?! So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
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.