From a7add6bc13df16cfbe42e6ae02ff1c6a0c4c1313 Mon Sep 17 00:00:00 2001 From: Babbaj Date: Wed, 28 Aug 2019 20:37:05 -0400 Subject: [PATCH] Replace klass with cla$$ --- src/api/java/baritone/api/Settings.java | 4 ++-- src/api/java/baritone/api/utils/SettingsUtil.java | 14 +++++++------- .../java/baritone/behavior/InventoryBehavior.java | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index c7cee8bb..22125a77 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -985,10 +985,10 @@ public final class Settings { } @SuppressWarnings("unchecked") - public List> getAllValuesByType(Class klass) { + public List> getAllValuesByType(Class cla$$) { List> result = new ArrayList<>(); for (Setting setting : allSettings) { - if (setting.getValueClass().equals(klass)) { + if (setting.getValueClass().equals(cla$$)) { result.add((Setting) setting); } } diff --git a/src/api/java/baritone/api/utils/SettingsUtil.java b/src/api/java/baritone/api/utils/SettingsUtil.java index 9c21dcf3..4e659dec 100644 --- a/src/api/java/baritone/api/utils/SettingsUtil.java +++ b/src/api/java/baritone/api/utils/SettingsUtil.java @@ -222,22 +222,22 @@ public class SettingsUtil { } }; - private final Class klass; + private final Class cla$$; private final Function parser; private final Function toString; Parser() { - this.klass = null; + this.cla$$ = null; this.parser = null; this.toString = null; } - Parser(Class klass, Function parser) { - this(klass, parser, Object::toString); + Parser(Class cla$$, Function parser) { + this(cla$$, parser, Object::toString); } - Parser(Class klass, Function parser, Function toString) { - this.klass = klass; + Parser(Class cla$$, Function parser, Function toString) { + this.cla$$ = cla$$; this.parser = parser::apply; this.toString = x -> toString.apply((T) x); } @@ -256,7 +256,7 @@ public class SettingsUtil { @Override public boolean accepts(Type type) { - return type instanceof Class && this.klass.isAssignableFrom((Class) type); + return type instanceof Class && this.cla$$.isAssignableFrom((Class) type); } public static Parser getParser(Type type) { diff --git a/src/main/java/baritone/behavior/InventoryBehavior.java b/src/main/java/baritone/behavior/InventoryBehavior.java index ae19af86..eface5c0 100644 --- a/src/main/java/baritone/behavior/InventoryBehavior.java +++ b/src/main/java/baritone/behavior/InventoryBehavior.java @@ -102,7 +102,7 @@ public final class InventoryBehavior extends Behavior { return -1; } - private int bestToolAgainst(Block against, Class klass) { + private int bestToolAgainst(Block against, Class cla$$) { NonNullList invy = ctx.player().inventory.mainInventory; int bestInd = -1; double bestSpeed = -1; @@ -111,7 +111,7 @@ public final class InventoryBehavior extends Behavior { if (stack.isEmpty()) { continue; } - if (klass.isInstance(stack.getItem())) { + if (cla$$.isInstance(stack.getItem())) { double speed = ToolSet.calculateSpeedVsBlock(stack, against.getDefaultState()); // takes into account enchants if (speed > bestSpeed) { bestSpeed = speed;