Skip to content

Commit

Permalink
Fix crash with latest Baritone builds
Browse files Browse the repository at this point in the history
  • Loading branch information
MineGame159 committed Apr 21, 2024
1 parent 8a70796 commit 53b141f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
import net.minecraft.item.Item;

import java.awt.*;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -77,6 +75,8 @@ private void createWrappers() {
Class<? extends baritone.api.Settings> klass = BaritoneAPI.getSettings().getClass();

for (Field field : klass.getDeclaredFields()) {
if (Modifier.isStatic(field.getModifiers())) continue;

Object obj = field.get(BaritoneAPI.getSettings());
if (!(obj instanceof baritone.api.Settings.Setting setting)) continue;

Expand Down

0 comments on commit 53b141f

Please sign in to comment.