Spyeedy Posted July 31, 2016 Share Posted July 31, 2016 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? Quote 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 Link to comment Share on other sites More sharing options...
SHsuperCM Posted July 31, 2016 Share Posted July 31, 2016 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 Quote Doing stuff n' things Link to comment Share on other sites More sharing options...
Spyeedy Posted August 2, 2016 Author Share Posted August 2, 2016 Bump Quote 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 Link to comment Share on other sites More sharing options...
Spyeedy Posted August 12, 2016 Author Share Posted August 12, 2016 Bump Quote 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 Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 12, 2016 Share Posted August 12, 2016 Does aiControlledByPlayer every get initialized? Quote 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. Link to comment Share on other sites More sharing options...
Spyeedy Posted August 12, 2016 Author Share Posted August 12, 2016 Does aiControlledByPlayer every get initialized? Do I need to? Looking at the EntityPig class, aiControlledByPlayer does not get initialized. Quote 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 Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 12, 2016 Share Posted August 12, 2016 Actually you did initialize it i didnt seenit and of course it does otherwise you would pass in a null object. Try overriding getControllingPassenger Quote 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. Link to comment Share on other sites More sharing options...
Spyeedy Posted August 12, 2016 Author Share Posted August 12, 2016 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. Quote 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 Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 12, 2016 Share Posted August 12, 2016 What version of minecraft are you using as it should exist in Entity in 1.10.2 Quote 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. Link to comment Share on other sites More sharing options...
Spyeedy Posted August 12, 2016 Author Share Posted August 12, 2016 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. Quote 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 Link to comment Share on other sites More sharing options...
Animefan8888 Posted August 12, 2016 Share Posted August 12, 2016 Try basing it off EntityHorse because AIControlledByPlayer seems to be used for EntityPig and the Carrot On A Stick item. Quote 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. 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.