Cog wheels
This commit is contained in:
+16
-12
@@ -107,20 +107,24 @@ export class MultiPlayerGameMode {
|
||||
const place_block = place_id !== undefined
|
||||
? EverythingRegistry.get<BlockRegistry>("blocks", place_id)
|
||||
: undefined;
|
||||
// with the states the server will give it, see BlockRules.placement_value, and holding the liquid it goes into
|
||||
const place_value = place_block &&
|
||||
waterlog_placement(
|
||||
block_rules.placement_value(place_block, this.client.player.yaw, this.client.player.pitch, {
|
||||
...target,
|
||||
face: hit.face,
|
||||
hit: hit.hit,
|
||||
sneaking,
|
||||
}),
|
||||
place_block,
|
||||
// with the states the server will give it, see BlockRules.placement_value, and holding the liquid it goes into.
|
||||
// undefined when its rules say it can't go there
|
||||
const ruled_value = place_block &&
|
||||
block_rules.placement_value(place_block, this.client.player.yaw, this.client.player.pitch, {
|
||||
...target,
|
||||
face: hit.face,
|
||||
hit: hit.hit,
|
||||
sneaking,
|
||||
});
|
||||
const place_value = ruled_value !== undefined
|
||||
? waterlog_placement(
|
||||
ruled_value,
|
||||
place_block!,
|
||||
level.get_block_value(target.x, target.y, target.z),
|
||||
EverythingRegistry.get_by_id<BlockRegistry>("blocks", current),
|
||||
);
|
||||
const placeable = place_id !== undefined && can_place(
|
||||
)
|
||||
: undefined;
|
||||
const placeable = place_value !== undefined && place_id !== undefined && can_place(
|
||||
place_block,
|
||||
current === AIR ? undefined : EverythingRegistry.get_by_id<BlockRegistry>("blocks", current),
|
||||
level.get_block_value(target.x, target.y, target.z),
|
||||
|
||||
Reference in New Issue
Block a user