feat(blockentity): 方块实体——熔炉烧炼(燃料/输入消耗/产出)与箱子容器(含测试)
This commit is contained in:
@@ -92,6 +92,11 @@ func (e *Entity) Tick() bool {
|
||||
e.CookTicks++
|
||||
if e.CookTicks >= CookTime {
|
||||
e.CookTicks = 0
|
||||
// 消耗一个输入(产出由调用方放入输出槽,物品与背包.md §6)
|
||||
e.Slots[SlotInput].Count--
|
||||
if e.Slots[SlotInput].Count == 0 {
|
||||
e.Slots[SlotInput] = item.Stack{}
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user