BrewingRelay.java 文件源码

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

项目:StarQuestCode 作者:
private boolean fillWaterBottle(BrewerInventory brewingInventory, InventoryManager manager) {
    if (!(manager.findMaterial(Material.WATER_BUCKET) && manager.findMaterial(Material.GLASS_BOTTLE)))
        return false;

    for (int i = 0; i < 3; i++) {
        ItemStack item = brewingInventory.getItem(i);
        if (item == null || item.getType() == Material.AIR) {
            // Add potion to the first empty potion slot in the brewing
            // stand.
            item = new ItemStack(Material.POTION);
            brewingInventory.setItem(i, item);
            manager.decrement();
            age = 0;
            return true;
        }
    }

    return false;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号