Fluid containers
This commit is contained in:
@@ -502,8 +502,9 @@ export class GameServer {
|
||||
let left = count;
|
||||
while (left > 0) {
|
||||
const stack = new ItemStack(id);
|
||||
stack.amount = Math.min(left, stack.max_amount);
|
||||
// first, a full fluid container stacks to fewer
|
||||
if (data !== undefined) stack.data = structuredClone(data);
|
||||
stack.amount = Math.min(left, stack.max_amount);
|
||||
left -= stack.amount;
|
||||
this.give_stack(player, stack);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user