Posted October 8, 20196 yr Okay. Bare with me. I've been updating from 1.12 to 1.14. I created a custom rideable entity in 1.12 that functioned fine. In 1.14 it still functions fine unless it's being ridden. In which case, it refuses to move. If I remove the rider by knocking it off or killing it, the custom mount will behave normally. Until another rider gets on. Eventually I tested the custom mount by having it spawn ridden by a husk. It also wouldn't move. I then tested having my custom rider spawn on a vanilla horse. They also wouldn't move. I then spawned (via my custom mounts spawn egg) a husk riding a horse and they also would not move. At this point, I'm very confused. Help… This is the code from the custom mounts spawn egg that I was using to spawn a husk on My custom mount, I also used this to spawn a husk riding a horse, which I stress again would not move in game.… public ILivingEntityData onInitialSpawn(IWorld worldIn, DifficultyInstance difficulty, SpawnReason reason, @Nullable ILivingEntityData entityLivingData, @Nullable CompoundNBT itemNbt) { entityLivingData = super.onInitialSpawn(worldIn, difficulty, reason, entityLivingData, itemNbt); if (this.rand.nextInt(5) == 0) { this.setGrowingAge(-24000); } int i = this.rand.nextInt(100); this.setRaptorVariant(i > 89 ? 2 : (i > 44 ? 1 : 0)); /* HuskEntity sacskel = EntityType.HUSK.create(this.world); sacskel.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, 0.0F); sacskel.onInitialSpawn(worldIn, difficulty, reason, (ILivingEntityData)null, (CompoundNBT)null); this.setGrowingAge(0); this.raptorChest.setInventorySlotContents(0, new ItemStack(Items.SADDLE)); this.updateRaptorSlots(); this.setRaptorTamed(1); worldIn.addEntity(sacskel); sacskel.startRiding(this);*/ return entityLivingData; }
October 10, 20196 yr Author Anyone got any thoughts? The fact the husk on a horse won't move is pretty confusing. I tried updating to the latest version of forged today, but that did nothing.Also, just to note having a saddle is key. Without a saddle the horse/custom mount will skip all the passenger code in the travel method… Edited October 10, 20196 yr by salvestrom
October 13, 20196 yr Author I have been trying to rule out what it isn't, for example: the code for checking if an entity is being ridden is returning correctly. At the moment my focus is on trying to account for why the husk riding a horse won't move. A skeleton on a spider, spawned from a spider egg functions, but that's because it's not saddled and so it is the spider that is moving, not the rider. Which is another hint of where the problem may lie. Is there anyone reading this who has a functioning custom mount with a custom rider that is actually moving correctly so that I can be sure there is something wrong my end.
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.