Skip to content

Commit 6ab9581

Browse files
committed
Recipes module - workaround for JDK-8072596
1 parent fdd599c commit 6ab9581

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/js/modules/canary/recipes.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ function createRecipe( recipe ){
2626
}
2727
rows.push( new cmRecipeRow(recipe.shape[i], rr) );
2828
}
29+
/*
30+
wph 20150607 short-term workaround for nashorn defect
31+
https://bugs.openjdk.java.net/browse/JDK-8072596
32+
*/
33+
if ( typeof Java !== 'undefined' && typeof Java.type === 'function' ) {
34+
var RecipeRowArrayType = Java.type('net.canarymod.api.inventory.recipes.RecipeRow[]');
35+
rows = Java.to( rows, RecipeRowArrayType );
36+
}
2937
result = cmRecipe.createShapedRecipe( recipe.result, rows);
3038
} else {
3139
result = cmRecipe.createShapelessRecipe( recipe.result, recipe.ingredients );

0 commit comments

Comments
 (0)