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

Method getCustomFOVModifier

Minecraft-Utils/1.9/src/ClassProxy.java:388–418  ·  view source on GitHub ↗
(Object object)

Source from the content-addressed store, hash-verified

386 }
387
388 public static float getCustomFOVModifier(Object object) {
389 bmq playerInstance = (bmq) object;
390
391 float modifier = 1.0F;
392 if (playerInstance.bJ.b) {
393 // is Flying
394 modifier *= 1.1F;
395 }
396 sm movementSpeedAttribute = playerInstance.a(yt.d);
397 if (movementSpeedAttribute.a(SPRINT_MODIFIER_UUID) != null) {
398 modifier = (float) ((double) modifier * (movementSpeedAttribute.b() * 1.30000001192092896D / playerInstance.bJ.b() + 1.0) / 2.0D);
399 }
400 if (playerInstance.bJ.b() == 0.0F || Float.isNaN(modifier) || Float.isInfinite(modifier)) {
401 modifier = 1.0F;
402 }
403
404 if (playerInstance.cs() && playerInstance.cv() != null && playerInstance.cv().b() == ads.f) {
405 // is using bow
406 int itemInUseDuration = playerInstance.cx();
407 float itemInUseDurationSeconds = (float) itemInUseDuration / 20.0F;
408 if (itemInUseDurationSeconds > 1.0F) {
409 itemInUseDurationSeconds = 1.0F;
410 } else {
411 itemInUseDurationSeconds *= itemInUseDurationSeconds;
412 }
413
414 modifier *= 1.0F - itemInUseDurationSeconds * 0.15F;
415 }
416
417 return modifier;
418 }
419
420 public static String[] getSignText(Object signTile) {
421 eu[] lines = ((aqn) signTile).a;

Callers

nothing calls this directly

Calls 2

aMethod · 0.45
bMethod · 0.45

Tested by

no test coverage detected