WorldFactory.java 文件源码

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

项目:Mechanization-old 作者:
public static boolean takeFurnaceFuel(Furnace f, int fuel){
    FurnaceInventory inv = f.getInventory();
    if (inv.getFuel().getAmount()>fuel){
        ItemStack is = inv.getFuel();
        is.setAmount(is.getAmount()-fuel);
        return true;
    } else if (inv.getFuel().getAmount()==fuel){
        inv.setFuel(new ItemStack(Material.AIR));
        return true;
    }
    return false;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号