validators to creative movement controls
This commit is contained in:
1 parent
a4750f7238
commit
9afd1f3211
3 files changed
+22
-17
No files matched your search
@@ -27,11 +27,11 @@ public abstract class LivingEntity_creativeFlyMixin extends Entity
|
||||
@ModifyConstant(method = "travel", constant = @Constant(floatValue = 0.91F), expect = 2)
|
||||
private float drag(float original)
|
||||
{
|
||||
if (CarpetSettings.creativeFlyDrag != 0.91D && (Object)this instanceof PlayerEntity)
|
||||
if (CarpetSettings.creativeFlyDrag != 0.09 && (Object)this instanceof PlayerEntity)
|
||||
{
|
||||
PlayerEntity self = (PlayerEntity)(Object)(this);
|
||||
if (self.abilities.flying && ! onGround )
|
||||
return (float)CarpetSettings.creativeFlyDrag;
|
||||
return (float)(1.0-CarpetSettings.creativeFlyDrag);
|
||||
}
|
||||
return original;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user