RailLogic logic = member.getRailTracker().getLastLogic();
IntVector3 lastRailPos = new IntVector3(member.getRailTracker().getLastBlock());
// Get from and to rail-fixed positions
Vector startVector = logic.getFixedPosition(entity, entity.last, lastRailPos);
Vector endVector = getFixedPosition(entity, entity.loc, member.getBlockPos());
// Update fixed Y-position
entity.setPosition(entity.loc.getX(), endVector.getY(), entity.loc.getZ());
// Apply velocity factors from going up/down the slope
if (member.getGroup().getProperties().isSlowingDown()) {
final double motLength = entity.vel.xz.length();
if (motLength > 0) {
entity.vel.xz.multiply((startVector.getY() - endVector.getY()) * 0.05 / motLength + 1.0);
}
}
}