@Override
public Optional<ItemMeshDefinition> __getCustomMeshDefinition() {
// DO NOT use a lambda here, converting this code to a lambda results
// in the model being unresolvable
//noinspection Convert2Lambda
return Optional.of(new ItemMeshDefinition() {
@Override
public ModelResourceLocation getModelLocation(ItemStack stack) {
Optional<org.spongepowered.api.item.inventory.ItemStack> optContained = getPrizeStack(stack);
return optContained.isPresent() ? new ModelResourceLocation(
optContained.get().getItem().getId(),
"inventory"
) : null;
}
});
}
PrizeBox.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:Skree
作者:
评论列表
文章目录