Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void speedupPlayer(World world, Entity entity, double concreteVelocity)
- {
- double velocity = Math.sqrt(entity.field_70159_w * entity.field_70159_w + entity.field_70179_y * entity.field_70179_y);
- if (!(entity instanceof EntityPlayerSP)) {
- return;
- }
- if (velocity == 0.0D) {
- return;
- }
- if (velocity >= Configurations.concreteVelocity) {
- return;
- }
- EntityPlayerSP player = (EntityPlayerSP)entity;
- if ((Math.abs(player.field_71158_b.field_78900_b) < 0.75F) && (Math.abs(player.field_71158_b.field_78902_a) < 0.75F)) {
- return;
- }
- entity.field_70159_w = (Configurations.concreteVelocity * entity.field_70159_w / velocity);
- entity.field_70179_y = (Configurations.concreteVelocity * entity.field_70179_y / velocity);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement