diff --git a/src/main/java/net/minecraftforge/common/ToolType.java b/src/main/java/net/minecraftforge/common/ToolType.java index d7a355fda..effa403bc 100644 --- a/src/main/java/net/minecraftforge/common/ToolType.java +++ b/src/main/java/net/minecraftforge/common/ToolType.java @@ -38,7 +38,7 @@ public final class ToolType { if (VALID_NAME.matcher(name).find()) throw new IllegalArgumentException("ToolType.create() called with invalid name: " + name); - return values.putIfAbsent(name, new ToolType(name)); + return values.computeIfAbsent(name, k -> new ToolType(name)); } private final String name;