Cog wheels
This commit is contained in:
@@ -1212,16 +1212,22 @@ export class GameServer {
|
||||
}
|
||||
// solid blocks can't go where a mob or player is, the one placing it included, like minecraft
|
||||
const placing = EverythingRegistry.get<BlockRegistry>("blocks", held.block_id)!;
|
||||
const ruled_value = this.mods.rules.placement_value(placing, player.yaw, player.pitch, {
|
||||
x: tx,
|
||||
y: ty,
|
||||
z: tz,
|
||||
face,
|
||||
hit: [hit[0], hit[1], hit[2]],
|
||||
sneaking: player.sneaking,
|
||||
});
|
||||
// its rules say it can't go there
|
||||
if (ruled_value === undefined) {
|
||||
this.#correct(player, tx, ty, tz);
|
||||
return;
|
||||
}
|
||||
// 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, player.pitch, {
|
||||
x: tx,
|
||||
y: ty,
|
||||
z: tz,
|
||||
face,
|
||||
hit: [hit[0], hit[1], hit[2]],
|
||||
sneaking: player.sneaking,
|
||||
}),
|
||||
ruled_value,
|
||||
placing,
|
||||
this.world.get_block_value(tx, ty, tz),
|
||||
this.world.get_block_info(tx, ty, tz),
|
||||
|
||||
Reference in New Issue
Block a user