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

Method getCustomFOVModifier

Minecraft-Utils/1.12/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 bty playerInstance = (bty) object;
387
388 float modifier = 1.0F;
389 if (playerInstance.bO.b) {
390 // is Flying
391 modifier *= 1.1F;
392 }
393 wb movementSpeedAttribute = playerInstance.a(adf.d);
394 if (movementSpeedAttribute.a(SPRINT_MODIFIER_UUID) != null) {
395 modifier = (float) ((double) modifier * (movementSpeedAttribute.b() * 1.30000001192092896D / playerInstance.bO.b() + 1.0) / 2.0D);
396 }
397 if (playerInstance.bO.b() == 0.0F || Float.isNaN(modifier) || Float.isInfinite(modifier)) {
398 modifier = 1.0F;
399 }
400
401 if (playerInstance.cG() && playerInstance.cJ().c() == aip.g) {
402 // is using bow
403 int itemInUseDuration = playerInstance.cL();
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 hh[] lines = ((awa) signTile).a;

Callers

nothing calls this directly

Calls 3

aMethod · 0.45
bMethod · 0.45
cMethod · 0.45

Tested by

no test coverage detected