Merge branch 'master' into 1.16
This commit is contained in:
commit
903fe1e31a
5 files changed
+25
-20
No files matched your search
+1
-1
@@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
|
||||
loader_version=0.8.2+build.194
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.3.22+v200506
|
||||
mod_version = 1.3.23+v200513
|
||||
maven_group = carpet
|
||||
archives_base_name = fabric-carpet
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import static carpet.settings.RuleCategory.CLIENT;
|
||||
@SuppressWarnings("CanBeFinal")
|
||||
public class CarpetSettings
|
||||
{
|
||||
public static final String carpetVersion = "1.3.22+v200506";
|
||||
public static final String carpetVersion = "1.3.23+v200513";
|
||||
public static final Logger LOG = LogManager.getLogger();
|
||||
public static boolean skipGenerationChecks = false;
|
||||
public static boolean impendingFillSkipUpdates = false;
|
||||
@@ -608,18 +608,23 @@ public class CarpetSettings
|
||||
"having it set on the decicated server has no effect",
|
||||
"but this also means it will work on vanilla servers as well"
|
||||
},
|
||||
category = {CREATIVE, CLIENT}
|
||||
category = {CREATIVE, CLIENT},
|
||||
validate = Validator.NONNEGATIVE_NUMBER.class
|
||||
)
|
||||
public static double creativeFlySpeed = 1.0f;
|
||||
public static double creativeFlySpeed = 1.0;
|
||||
|
||||
@Rule(
|
||||
desc = "Creative air drag",
|
||||
extra = {
|
||||
"Increased drag will slow down your flight",
|
||||
"So need to adjust speed accordingly",
|
||||
"With 1.0 drag, using speed of 11 seems to matching vanilla speeds.",
|
||||
"Purely client side setting, meaning that",
|
||||
"having it set on the decicated server has no effect",
|
||||
"but this also means it will work on vanilla servers as well"
|
||||
},
|
||||
category = {CREATIVE, CLIENT}
|
||||
category = {CREATIVE, CLIENT},
|
||||
validate = Validator.PROBABILITY.class
|
||||
)
|
||||
public static double creativeFlyDrag = 0.91f;
|
||||
public static double creativeFlyDrag = 0.09;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -17,17 +17,6 @@ public abstract class Validator<T>
|
||||
public abstract T validate(ServerCommandSource source, ParsedRule<T> currentRule, T newValue, String string);
|
||||
public String description() {return null;}
|
||||
|
||||
public static class POSITIVE_NUMBER<T extends Number> extends Validator<T>
|
||||
{
|
||||
@Override
|
||||
public T validate(ServerCommandSource source, ParsedRule<T> currentRule, T newValue, String string)
|
||||
{
|
||||
return newValue.doubleValue() > 0 ? newValue : null;
|
||||
}
|
||||
@Override
|
||||
public String description() { return "Must be a positive number"; }
|
||||
}
|
||||
|
||||
public static class _COMMAND<T> extends Validator<T>
|
||||
{
|
||||
@Override
|
||||
@@ -119,4 +108,15 @@ public abstract class Validator<T>
|
||||
@Override
|
||||
public String description() { return "Must be a positive number";}
|
||||
}
|
||||
|
||||
public static class PROBABILITY <T extends Number> extends Validator<T>
|
||||
{
|
||||
@Override
|
||||
public T validate(ServerCommandSource source, ParsedRule<T> currentRule, T newValue, String string)
|
||||
{
|
||||
return (newValue.doubleValue() >= 0 && newValue.doubleValue() <= 1 )? newValue : null;
|
||||
}
|
||||
@Override
|
||||
public String description() { return "Must be between 0 and 1";}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "carpet",
|
||||
"version": "1.3.22",
|
||||
"version": "1.3.23",
|
||||
|
||||
"name": "Carpet Mod in Fabric",
|
||||
"description": "Carpet made out of fabric",
|
||||
|
||||
Reference in new issue
Block a user