visual: Fix itemStackMax not initialized on insert (#53)

Co-authored-by: jessicara <chi@chi.hakurei.shrine>
This commit is contained in:
白狐
2020-09-23 15:10:39 +01:00
committed by GitHub
parent 4e2e3a02b4
commit c490b1fc12

View File

@ -317,6 +317,7 @@ core.register_entity("drawers:visual", {
self.count = 0 self.count = 0
self.itemName = itemstack:get_name() self.itemName = itemstack:get_name()
self.maxCount = itemstack:get_stack_max() * self.stackMaxFactor self.maxCount = itemstack:get_stack_max() * self.stackMaxFactor
self.itemStackMax = itemstack:get_stack_max()
end end
-- update everything -- update everything