From ab92801740c92a56378bb3e60d97626d3ff25ec2 Mon Sep 17 00:00:00 2001 From: Cadiboo <37298044+Cadiboo@users.noreply.github.com> Date: Tue, 19 Feb 2019 09:12:07 +1100 Subject: [PATCH] Fix bug with ObfuscationReflectionHelper (#5509) --- .../fml/common/ObfuscationReflectionHelper.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/minecraftforge/fml/common/ObfuscationReflectionHelper.java b/src/main/java/net/minecraftforge/fml/common/ObfuscationReflectionHelper.java index e2452eead..cdc58ccef 100644 --- a/src/main/java/net/minecraftforge/fml/common/ObfuscationReflectionHelper.java +++ b/src/main/java/net/minecraftforge/fml/common/ObfuscationReflectionHelper.java @@ -153,9 +153,7 @@ public class ObfuscationReflectionHelper * Throws an exception if the method is not found. * * @param clazz The class to find the method on. - * @param methodName The name of the method to find (used in developer environments, i.e. "getWorldTime"). - * @param methodObfName The obfuscated name of the method to find (used in obfuscated environments, i.e. "func_72820_D"). - * If the name you are looking for is on a class that is never obfuscated, this should be null. + * @param methodName The SRG (obfuscated) name of the method to find(e.g. "func_72820_D"). * @param parameterTypes The parameter types of the method to find. * @return The method with the specified name and parameters in the given class. */ @@ -164,7 +162,7 @@ public class ObfuscationReflectionHelper { Preconditions.checkNotNull(clazz); Preconditions.checkNotNull(methodName); - Preconditions.checkArgument(methodName.isEmpty(), "Method name cannot be empty"); + Preconditions.checkArgument(!methodName.isEmpty(), "Method name cannot be empty"); try {