Fluid containers

This commit is contained in:
2026-10-25 15:02:31 -03:00
parent fc27771a92
commit 26b59a1899
24 changed files with 486 additions and 82 deletions
+2 -1
View File
@@ -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);
}