API Surface (0) No public/protected methods detected (fields or constants only).
Fields & Constants (5) ADD
SUBTRACT
MULTIPLY
MINIMUM
MAXIMUM
Code Graph: Dependencies (3) Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
IntegerModifier.java 29 lines · Minecraft 26.3 · verbatim Copy
1 package net.minecraft.world.attribute.modifier;
2
3 import com.mojang.serialization.Codec;
4 import net.minecraft.world.attribute.EnvironmentAttribute;
5 import net.minecraft.world.attribute.LerpFunction;
6
7 public interface IntegerModifier<Argument> extends AttributeModifier<Integer, Argument> {
8 IntegerModifier<Integer> ADD = Integer::sum;
9 IntegerModifier<Integer> SUBTRACT = (a, b) -> a - b;
10 IntegerModifier<Integer> MULTIPLY = (a, b) -> a * b;
11 IntegerModifier<Integer> MINIMUM = Math::min;
12 IntegerModifier<Integer> MAXIMUM = Math::max;
13
14 Integer apply(Integer integer, Argument argument);
15
16 @FunctionalInterface
17 interface Simple extends IntegerModifier<Integer> {
18 @Override
19 default Codec<Integer> argumentCodec(final EnvironmentAttribute<Integer> type) {
20 return Codec.INT;
21 }
22
23 @Override
24 default LerpFunction<Integer> argumentKeyframeLerp(final EnvironmentAttribute<Integer> type) {
25 return LerpFunction.ofInteger();
26 }
27 }
28 }
29
Decompiled Minecraft 26.3 source of IntegerModifier (net/minecraft/world/attribute/modifier/IntegerModifier.java) with Mojang official mappings, stored verbatim on the site.