MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / getCustomFOVModifier

Method getCustomFOVModifier

Minecraft-Utils/1.10/src/ClassProxy.java:383–413  ·  view source on GitHub ↗
(Object object)

Source from the content-addressed store, hash-verified

381 }
382
383 public static float getCustomFOVModifier(Object object) {
384 bnk playerInstance = (bnk) object;
385
386 float modifier = 1.0F;
387 if (playerInstance.bL.b) {
388 // is Flying
389 modifier *= 1.1F;
390 }
391 ss movementSpeedAttribute = playerInstance.a(za.d);
392 if (movementSpeedAttribute.a(SPRINT_MODIFIER_UUID) != null) {
393 modifier = (float) ((double) modifier * (movementSpeedAttribute.b() * 1.30000001192092896D / playerInstance.bL.b() + 1.0) / 2.0D);
394 }
395 if (playerInstance.bL.b() == 0.0F || Float.isNaN(modifier) || Float.isInfinite(modifier)) {
396 modifier = 1.0F;
397 }
398
399 if (playerInstance.cx() && playerInstance.cA() != null && playerInstance.cA().b() == aeb.f) {
400 // is using bow
401 int itemInUseDuration = playerInstance.cC();
402 float itemInUseDurationSeconds = (float) itemInUseDuration / 20.0F;
403 if (itemInUseDurationSeconds > 1.0F) {
404 itemInUseDurationSeconds = 1.0F;
405 } else {
406 itemInUseDurationSeconds *= itemInUseDurationSeconds;
407 }
408
409 modifier *= 1.0F - itemInUseDurationSeconds * 0.15F;
410 }
411
412 return modifier;
413 }
414
415 public static String[] getSignText(Object signTile) {
416 ey[] lines = ((arc) signTile).a;

Callers

nothing calls this directly

Calls 2

aMethod · 0.45
bMethod · 0.45

Tested by

no test coverage detected