File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 7
7
import net .minecraft .item .ItemStack ;
8
8
import net .minecraft .item .Items ;
9
9
import org .eclipse .jgit .api .Git ;
10
+ import org .slf4j .Logger ;
11
+ import org .slf4j .LoggerFactory ;
10
12
11
13
import java .io .File ;
12
14
import java .nio .file .Files ;
@@ -109,6 +111,7 @@ public static List<Recipe> getRecipes(String internalName) {
109
111
}
110
112
111
113
class Recipe {
114
+ private static final Logger LOGGER = LoggerFactory .getLogger (Recipe .class );
112
115
String text = "" ;
113
116
List <ItemStack > grid = new ArrayList <>(9 );
114
117
ItemStack result ;
@@ -130,12 +133,17 @@ public static Recipe fromJsonObject(JsonObject jsonObj) {
130
133
}
131
134
132
135
private static ItemStack getItemStack (String internalName ) {
133
- if (internalName .length () > 0 ) {
134
- int count = Integer .parseInt (internalName .split (":" )[1 ]);
135
- internalName = internalName .split (":" )[0 ];
136
- ItemStack itemStack = ItemRegistry .itemsMap .get (internalName ).copy ();
137
- itemStack .setCount (count );
138
- return itemStack ;
136
+ try {
137
+ if (internalName .length () > 0 ) {
138
+ int count = Integer .parseInt (internalName .split (":" )[1 ]);
139
+ internalName = internalName .split (":" )[0 ];
140
+ ItemStack itemStack = ItemRegistry .itemsMap .get (internalName ).copy ();
141
+ itemStack .setCount (count );
142
+ return itemStack ;
143
+ }
144
+ }
145
+ catch (Exception e ) {
146
+ LOGGER .error ("[Skyblocker-Recipe] " +internalName ,e );
139
147
}
140
148
return Items .AIR .getDefaultStack ();
141
149
}
You can’t perform that action at this time.
0 commit comments