use of com.simibubi.create.content.contraptions.components.actors.SeatEntity in project Create by Creators-of-Create.
the class Contraption method moveSeat.
private void moveSeat(Level world, BlockPos pos) {
BlockPos local = toLocalPos(pos);
getSeats().add(local);
List<SeatEntity> seatsEntities = world.getEntitiesOfClass(SeatEntity.class, new AABB(pos));
if (!seatsEntities.isEmpty()) {
SeatEntity seat = seatsEntities.get(0);
List<Entity> passengers = seat.getPassengers();
if (!passengers.isEmpty())
initialPassengers.put(local, passengers.get(0));
}
}
Aggregations