Make Infinity Boots step assist configurable (#65)

This commit is contained in:
Wilhelm Schuster authored and GitHub committed 2025-10-16 13:51:42 +02:00
1 parent 4f8f29e291
commit 24ed442f27
2 files changed
+6 -2

No files matched your search

@@ -14,6 +14,7 @@ public class Config {
public static boolean boringFood = false;
public static boolean fractured = false;
public static boolean fast = true;
public static boolean stepUp = true;
public static boolean thaumic = true;
public static boolean sc2 = true;
@@ -92,6 +93,9 @@ public class Config {
"Gotta Go Fast",
fast,
"Disable if the Infinity Boots' speed boost is too ridiculous").getBoolean(true);
stepUp = conf
.get("general", "Boots step up", stepUp, "Disable if the Infinity Boots' step assist is annoying")
.getBoolean(true);
conf.addCustomCategoryComment(
"compatibility",
@@ -323,7 +323,7 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
boolean swimming = player.isInsideOfMaterial(Material.water) || player.isInWater();
if (player.onGround || flying || swimming) {
boolean sneaking = player.isSneaking();
player.stepHeight = sneaking ? 0.501f : 1.001f;
if (Config.stepUp) player.stepHeight = sneaking ? 0.501f : 1.001f;
float speed = 0.15f * (flying ? 1.1f : 1.0f) * (sneaking ? 0.1f : 1.0f);
@@ -349,7 +349,7 @@ public class ItemArmorInfinity extends ItemArmor implements ICosmicRenderItem, I
}
} else {
playersWithFoot.remove(key);
player.stepHeight = 0.5f;
if (Config.stepUp) player.stepHeight = 0.5f;
}
} else if (hasFoot) {
playersWithFoot.add(key);