use of de.siphalor.nbtcrafting.util.duck.ICloneable in project nbt-crafting by Siphalor.
the class MixinIngredient method ofAdvancedEntries.
@Unique
private static Ingredient ofAdvancedEntries(Stream<? extends IngredientEntry> entries) {
if (entries == null)
NbtCrafting.logError("Internal error: can't construct ingredient from null entry stream!");
try {
Ingredient ingredient;
// noinspection ConstantConditions
ingredient = (Ingredient) ((ICloneable) (Object) Ingredient.EMPTY).clone();
((IIngredient) (Object) ingredient).nbtCrafting$setAdvancedEntries(entries);
return ingredient;
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return Ingredient.EMPTY;
}
Aggregations