Posted February 23, 20169 yr I write this code for spawn entity. ICommandSender is p_71515_1_ World world = p_71515_1_.getEntityWorld(); EntityTower entity1 = new EntityTower(p_71515_1_.getEntityWorld()); entity1.setPosition(i + 0.5D, j+1, k + 0.5D); world.spawnEntityInWorld(entity1); top code can spawn it but bottom code can't remove it. World world = p_71515_1_.getEntityWorld(); EntityTower entity1 = new EntityTower(p_71515_1_.getEntityWorld()); entity1.setPosition(i + 0.5D, j+1, k + 0.5D); world.removeEntity(entity1); I want how to do ?
February 23, 20169 yr Author I want create it in EntityTower by method setDead() ? public void setDead() { this.isDead = true; }
February 23, 20169 yr Author World world = p_71515_1_.getEntityWorld(); EntityTower entity1 = new EntityTower(p_71515_1_.getEntityWorld()); entity1.setPosition(i + 0.5D, j+1, k + 0.5D); entity1.setDead(); give me call it ?
February 23, 20169 yr It is pretty straight forward. You need to get the entity you want to kill. Then you call entity.setDead(). How you get the entity depends on how you determine that you want to kill it
February 23, 20169 yr Author I need Kill entity tower positino x y z by entity1.setPosition(i, j+1, k); by EntityTower entity1 = new EntityTower(p_71515_1_.getEntityWorld()); but it can't dead. World world = p_71515_1_.getEntityWorld(); EntityTower entity1 = new EntityTower(world); entity1.setPosition(i, j+1, k); entity1.setDead();
February 23, 20169 yr zlapped, just call this: "p_71515_1_.setDead();" Like replace all of the world, and set position, and new entitytower stuff, with just "p_71515_1_.setDead();" Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help! http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/
February 23, 20169 yr zlapped, just call this: "p_71515_1_.setDead();" Like replace all of the world, and set position, and new entitytower stuff, with just "p_71515_1_.setDead();" That would kill the player. No. Ah, I misunderstood. Well, in that case, pretty much the only easy way I can think of is storing the towers created via command in a serverside array, then having some way for the player to reference that array when choosing which tower to delete. Another option is simply deleting the nearest tower to the commandsender, I guess. How to explain that to zlapped is another matter entirely, unfortunately. Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help! http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/
February 24, 20169 yr Author Tower it is entity extends mob. I want remove or delect it by world.removeEntity(entity); but can't do.
February 26, 20169 yr Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
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.