PrizeBox.java 文件源码

java
阅读 17 收藏 0 点赞 0 评论 0

项目:Skree 作者:
@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;
    }
  });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号