Recipes module - workaround for JDK-8072596
This commit is contained in:
parent
fdd599ca97
commit
6ab9581a62
1 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,14 @@ function createRecipe( recipe ){
|
|||
}
|
||||
rows.push( new cmRecipeRow(recipe.shape[i], rr) );
|
||||
}
|
||||
/*
|
||||
wph 20150607 short-term workaround for nashorn defect
|
||||
https://bugs.openjdk.java.net/browse/JDK-8072596
|
||||
*/
|
||||
if ( typeof Java !== 'undefined' && typeof Java.type === 'function' ) {
|
||||
var RecipeRowArrayType = Java.type('net.canarymod.api.inventory.recipes.RecipeRow[]');
|
||||
rows = Java.to( rows, RecipeRowArrayType );
|
||||
}
|
||||
result = cmRecipe.createShapedRecipe( recipe.result, rows);
|
||||
} else {
|
||||
result = cmRecipe.createShapelessRecipe( recipe.result, recipe.ingredients );
|
||||
|
|
Reference in a new issue