Posted August 18, 201411 yr I tried to create a simple cube as entity. The entity is not really "living", it has no health, can get no damage, and it is flying not walking. How should I realize that? 1. Should I use Entity or EntityLiving as super class? 2. If not EntityLiving, how can I properly render it? 3. If EntityLiving, how can I properly render it? 4. How can I use the Minecraft Pathfinding for my entity? 5. Do you know a way to let the flying not look straight and linear?
August 19, 201411 yr my suggestion is 1) get MCP , 2) decompile Minecraft, 3) have a look at the enderdragon, and bats in particular look at where they differ from the other entitys, since they are flying entities
August 19, 201411 yr I believe what you want is a standart entity. Just make it an entity. It will fly automatically.
August 19, 201411 yr You should use super class depending your needs so do comparing between classes. Look tutorials for custom mob rendering, that should help you with rendering. And no, you cannot use MC pathfinding for flying entities because pathfinder is made for entities in the ground so it tries to create path that is on the ground. You can create your own pathfinder AI task or use something from EntityGhast. With trigonometry you can create lines that are more "natural" or again, check how EntityGhast changes its position.
August 19, 201411 yr Making it move to the player is not difficult. Look at this easy trick. Put this in your onUpdate() method EntityPlayer player = this.worldObj.getClosestPlayerToEntity(this, 200); if(player.posX >= this.posX){ this.posX += 0.1; } if(player.posX <= this.posX){ this.posX -= 0.1; } Do the same with Y and Z and it will go right to a player.
August 20, 201411 yr @Override public boolean isEntityInvulnerable(){ return true; } this will make the entity unkillable
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.