Smithing table
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
TICKS_PER_SECOND,
|
||||
} from "$/common/constants.ts";
|
||||
import { BlockRegistry, EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
|
||||
import { click_slot, Container, ItemData, ItemStack, take_output } from "$/common/inventory.ts";
|
||||
import { can_take_output, click_slot, Container, ItemData, ItemStack, take_output } from "$/common/inventory.ts";
|
||||
import {
|
||||
AIR_ID,
|
||||
BlockChange,
|
||||
@@ -744,7 +744,8 @@ export class GameServer {
|
||||
}
|
||||
} else if (key === "screen" && player.screen?.layout.slots.find((s) => s.index === index)?.output) {
|
||||
const item = container.get_item(index);
|
||||
if (item && take_output(item, player.cursor)) {
|
||||
const allowed = (item: ItemStack) => player.screen?.on_take.get(index)?.(item) ?? true;
|
||||
if (item && can_take_output(item, player.cursor) && allowed(item) && take_output(item, player.cursor)) {
|
||||
container.set_item(index, undefined);
|
||||
}
|
||||
} else if (
|
||||
|
||||
Reference in New Issue
Block a user