zlappedx3 Posted February 23, 2016 Share Posted February 23, 2016 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 ? Quote Link to comment Share on other sites More sharing options...
zlappedx3 Posted February 23, 2016 Author Share Posted February 23, 2016 Please press F5 and then re-read sir. Quote Link to comment Share on other sites More sharing options...
zlappedx3 Posted February 23, 2016 Author Share Posted February 23, 2016 I want create it in EntityTower by method setDead() ? public void setDead() { this.isDead = true; } Quote Link to comment Share on other sites More sharing options...
zlappedx3 Posted February 23, 2016 Author Share Posted February 23, 2016 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 ? Quote Link to comment Share on other sites More sharing options...
zlappedx3 Posted February 23, 2016 Author Share Posted February 23, 2016 Do you have some sample code. I can't do it. Quote Link to comment Share on other sites More sharing options...
BusyBeever Posted February 23, 2016 Share Posted February 23, 2016 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 Quote Link to comment Share on other sites More sharing options...
zlappedx3 Posted February 23, 2016 Author Share Posted February 23, 2016 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(); Quote Link to comment Share on other sites More sharing options...
BusyBeever Posted February 23, 2016 Share Posted February 23, 2016 wat Quote Link to comment Share on other sites More sharing options...
Zetal Posted February 23, 2016 Share Posted February 23, 2016 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();" Quote 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/ Link to comment Share on other sites More sharing options...
zlappedx3 Posted February 23, 2016 Author Share Posted February 23, 2016 p_71515_1_ is not setDead() Quote Link to comment Share on other sites More sharing options...
Zetal Posted February 23, 2016 Share Posted February 23, 2016 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. Quote 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/ Link to comment Share on other sites More sharing options...
zlappedx3 Posted February 24, 2016 Author Share Posted February 24, 2016 Tower it is entity extends mob. I want remove or delect it by world.removeEntity(entity); but can't do. 1 Quote Link to comment Share on other sites More sharing options...
zlappedx3 Posted February 24, 2016 Author Share Posted February 24, 2016 Yeahhh. 1 Quote Link to comment Share on other sites More sharing options...
larsgerrits Posted February 26, 2016 Share Posted February 26, 2016 Quote 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/ Link to comment Share on other sites More sharing options...
Recommended Posts
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.