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

Method getFloat

The 5zig Mod/src/eu/the5zig/mod/config/ConfigNew.java:626–632  ·  view source on GitHub ↗

Tries to get the value of a float setting by its key. @param key the key of the setting. @return the float value of the setting or 0.0f, if the value of the setting is not a float or the setting does not exist.

(String key)

Source from the content-addressed store, hash-verified

624 * @return the float value of the setting or {@code 0.0f}, if the value of the setting is not a float or the setting does not exist.
625 */
626 public float getFloat(String key) {
627 ConfigItem item = items.get(key);
628 if (item == null) {
629 The5zigMod.logger.warn("Could not find " + key + " in config!");
630 }
631 return item instanceof FloatItem ? ((FloatItem) item).get() : 0;
632 }
633
634 /**
635 * Tries to get the value of a string setting by its key.

Callers 14

handleMouseInputMethod · 0.80
getCurrentScrollMethod · 0.80
drawScreenMethod · 0.80
flushMethod · 0.80
actionPerformedMethod · 0.80
drawScreenMethod · 0.80
onTickMethod · 0.80
onTickMethod · 0.80
get2ndChatOpacityMethod · 0.80
get2ndChatWidthMethod · 0.80

Calls 1

getMethod · 0.65

Tested by

no test coverage detected