MCPcopy Create free account
hub / github.com/Teneted/Tenet / ifPresent

Method ifPresent

src/main/java/net/minecraftforge/fml/OptionalMod.java:103–106  ·  view source on GitHub ↗

If a mod object is present, invoke the specified consumer with the object, otherwise do nothing. @param consumer block to be executed if a mod object is present @throws NullPointerException if mod object is present and consumer is null

(Consumer<? super T> consumer)

Source from the content-addressed store, hash-verified

101 * null
102 */
103 public void ifPresent(Consumer<? super T> consumer) {
104 if (getValue() != null)
105 consumer.accept(getValue());
106 }
107
108 /**
109 * If a mod object is present, and the mod object matches the given predicate,

Callers 15

CraftMagicNumbersClass · 0.45
fireRemapEventMethod · 0.45
FluidStackClass · 0.45
buildTransitionMethod · 0.45
dispatchConfigEventMethod · 0.45
loadModsMethod · 0.45
finishModsMethod · 0.45
displayModConfigMethod · 0.45
updateCacheMethod · 0.45

Calls 2

getValueMethod · 0.95
acceptMethod · 0.65

Tested by

no test coverage detected