Hand crank and shafts
This commit is contained in:
@@ -1214,7 +1214,7 @@ export class GameServer {
|
||||
const placing = EverythingRegistry.get<BlockRegistry>("blocks", held.block_id)!;
|
||||
// put into a source of the liquid it can hold, it holds it
|
||||
const placed_value = waterlog_placement(
|
||||
this.mods.rules.placement_value(placing, player.yaw, {
|
||||
this.mods.rules.placement_value(placing, player.yaw, player.pitch, {
|
||||
x: tx,
|
||||
y: ty,
|
||||
z: tz,
|
||||
|
||||
@@ -254,11 +254,12 @@ export class ModRuntime {
|
||||
if (typeof module.setup !== "function") {
|
||||
throw new ModLoadError(mod, "the shared script doesn't export a setup function");
|
||||
}
|
||||
const { world } = this.#context(mod, version, config);
|
||||
const { world, blocks } = this.#context(mod, version, config);
|
||||
const ctx: SharedContext = {
|
||||
mod: { id: mod, version },
|
||||
side: "server",
|
||||
tags: tag_api(),
|
||||
blocks,
|
||||
world: {
|
||||
get_block: world.get_block,
|
||||
get_state: world.get_state,
|
||||
@@ -697,6 +698,10 @@ export class ModRuntime {
|
||||
},
|
||||
is_face_sturdy: (x, y, z, face) => covers_face(game().world.collision_shape(x, y, z), face),
|
||||
get_block_data: (x, y, z) => game().world.get_tile(x, y, z)?.mod_data as never,
|
||||
get_block_ref: (x, y, z) => {
|
||||
const id = game().world.get_block_id(x, y, z);
|
||||
return id === AIR_ID ? undefined : this.block_ref(x, y, z, id);
|
||||
},
|
||||
set_block_ticking: (x, y, z, ticking) => game().set_tile_ticking(x, y, z, ticking),
|
||||
set_block_item: (x, y, z, item) => {
|
||||
const shown = item && item.count > 0 ? new_stack(item).to_data() : undefined;
|
||||
|
||||
Reference in New Issue
Block a user