Posted July 31, 20169 yr My Entity for some reason I do not know does not move when the player is riding it. Purpose of the Entity: A mode of transportation for the player, it can fly and no fall damage is to be received when mid-flight fall. [spoiler=Entity Class] public class EntityGreenGoblinGlider extends EntityCreature { /** AI task for player control. */ private final EntityAIControlledByPlayer aiControlledByPlayer; public EntityGreenGoblinGlider(World worldIn) { super(worldIn); this.tasks.addTask(0, this.aiControlledByPlayer = new EntityAIControlledByPlayer(this, 10.0F)); } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D); } @Override public boolean canBeSteered() { return true; } @Override public boolean interact(EntityPlayer player) { if (super.interact(player)) { return true; } else if (this.worldObj.isRemote || this.riddenByEntity != null && this.riddenByEntity != player) { return false; } else { player.mountEntity(this); return true; } } /** * Return the AI task for player control. */ public EntityAIControlledByPlayer getAIControlledByPlayer() { return this.aiControlledByPlayer; } } Where did I go wrong? http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img] Till next time. Thank you for delivering funny scenes to Star Trek as Chekov . Will always remember you
July 31, 20169 yr Im sorry but i dont have the fix for it, When an entity is ridden from what i know it cancels all Ai stuff.. if i were you i would start by looking at the way of Adding player control when its ridden... it seems that in this time there arent any moderators online which is a bit sad Because usally people come here as last way of help and in Some timezones it could take the whole day if you are not working Im something else meanwhile... #phonekeyboard Doing stuff n' things
August 2, 20169 yr Author Bump http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img] Till next time. Thank you for delivering funny scenes to Star Trek as Chekov . Will always remember you
August 12, 20169 yr Author Bump http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img] Till next time. Thank you for delivering funny scenes to Star Trek as Chekov . Will always remember you
August 12, 20169 yr Does aiControlledByPlayer every get initialized? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 12, 20169 yr Author Does aiControlledByPlayer every get initialized? Do I need to? Looking at the EntityPig class, aiControlledByPlayer does not get initialized. http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img] Till next time. Thank you for delivering funny scenes to Star Trek as Chekov . Will always remember you
August 12, 20169 yr Actually you did initialize it i didnt seenit and of course it does otherwise you would pass in a null object. Try overriding getControllingPassenger VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 12, 20169 yr Author Actually you did initialize it i didnt seenit and of course it does otherwise you would pass in a null object. Try overriding getControllingPassenger getControllingPassenger does not exists in EntityCreature, EntityLiving, EntityLivingBase and Entity. http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img] Till next time. Thank you for delivering funny scenes to Star Trek as Chekov . Will always remember you
August 12, 20169 yr What version of minecraft are you using as it should exist in Entity in 1.10.2 VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 12, 20169 yr Author What version of minecraft are you using as it should exist in Entity in 1.10.2 Ah sorry, for not stating in the title, I'm using 1.8.9. http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img] Till next time. Thank you for delivering funny scenes to Star Trek as Chekov . Will always remember you
August 12, 20169 yr Try basing it off EntityHorse because AIControlledByPlayer seems to be used for EntityPig and the Carrot On A Stick item. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
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.