Make entity ride another entity with procedure

Published by uSkizzik on
Status
Migrated
Issue description

I would like to have a procedure called something like "Start riding" and the entity you want.
It would be useful for some things including Mind Control ability (Which I want to add in my mod)

Issue comments

Submitted by MrScautHD on Sat, 08/29/2020 - 07:36 Permalink

entity.startRiding(entity2);

Oh, I thought I was going to have to migrate it myself. Thanks!

Submitted by MrScautHD on Thu, 09/10/2020 - 08:00 Permalink

this is the full code change the Entity Landingear to your entity:

Entity entity2 = new LandingGearEntity.CustomEntity(LandingGearEntity.entity, entity.world);
entity2.setPositionAndUpdate(entity.getPosX(), entity.getPosY(), entity.getPosZ());
entity.world.addEntity(entity2);
entity.startRiding(entity2);

custom snippes