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

Method getCustomFOVModifier

Minecraft-Utils/1.11/src/ClassProxy.java:385–415  ·  view source on GitHub ↗
(Object object)

Source from the content-addressed store, hash-verified

383 }
384
385 public static float getCustomFOVModifier(Object object) {
386 bpn playerInstance = (bpn) object;
387
388 float modifier = 1.0F;
389 if (playerInstance.bK.b) {
390 // is Flying
391 modifier *= 1.1F;
392 }
393 tj movementSpeedAttribute = playerInstance.a(aac.d);
394 if (movementSpeedAttribute.a(SPRINT_MODIFIER_UUID) != null) {
395 modifier = (float) ((double) modifier * (movementSpeedAttribute.b() * 1.30000001192092896D / playerInstance.bK.b() + 1.0) / 2.0D);
396 }
397 if (playerInstance.bK.b() == 0.0F || Float.isNaN(modifier) || Float.isInfinite(modifier)) {
398 modifier = 1.0F;
399 }
400
401 if (playerInstance.cy() && playerInstance.cB().c() == afk.g) {
402 // is using bow
403 int itemInUseDuration = playerInstance.cD();
404 float itemInUseDurationSeconds = (float) itemInUseDuration / 20.0F;
405 if (itemInUseDurationSeconds > 1.0F) {
406 itemInUseDurationSeconds = 1.0F;
407 } else {
408 itemInUseDurationSeconds *= itemInUseDurationSeconds;
409 }
410
411 modifier *= 1.0F - itemInUseDurationSeconds * 0.15F;
412 }
413
414 return modifier;
415 }
416
417 public static String[] getSignText(Object signTile) {
418 fb[] lines = ((ast) signTile).a;

Callers

nothing calls this directly

Calls 3

aMethod · 0.45
bMethod · 0.45
cMethod · 0.45

Tested by

no test coverage detected