コード例 #1
0
 @Nullable
 @Override
 public BaseItem createFromId(int id) {
   Item item = (Item) Item.itemRegistry.getObjectById(id);
   if (item != null) {
     return new BaseItem(Item.getIdFromItem(item), (short) item.getDamage(new ItemStack(item, 1)));
   } else {
     return null;
   }
 }