Rename all "liquid" mentions to "fluid"

This commit is contained in:
2026-10-25 13:54:53 -03:00
parent bcca8fa4a5
commit 0cfa4d9b4a
58 changed files with 547 additions and 548 deletions
+4 -4
View File
@@ -7,7 +7,7 @@ import type { Client } from "./client.ts";
import type { BlockHitResult } from "./level/client_level.ts";
import type { Container } from "$/common/inventory.ts";
import { AIR_ID } from "$/common/protocol.ts";
import { box_overlaps_block, can_place, liquid_block, placement_target, waterlog_placement } from "$/common/utils.ts";
import { box_overlaps_block, can_place, fluid_block, placement_target, waterlog_placement } from "$/common/utils.ts";
import { block_rules, predict_neighbors } from "./mods.ts";
import { collision_shape_at } from "$/common/block_shapes.ts";
import type { EntityJson } from "$/common/mod_data.ts";
@@ -83,11 +83,11 @@ export class MultiPlayerGameMode {
// the shared rules' on_interact, like a trapdoor opening, shows right away. the server runs them too and corrects
// this if it disagrees. when they do something nothing is placed, like on the server
// an item aimed at liquids, like a bucket, uses the liquid in a waterlogged block instead, like on the server
// an item aimed at fluids, like a bucket, uses the fluid in a waterlogged block instead, like on the server
const block_info = EverythingRegistry.get_by_id<BlockRegistry>("blocks", hit.block)!;
const held = this.held_item();
const value = level.get_block_value(hit.x, hit.y, hit.z);
const used = (held?.targets_liquids && liquid_block(value, block_info)) || block_info;
const used = (held?.targets_fluids && fluid_block(value, block_info)) || block_info;
// sneaking with an item skips the block, like on the server
const sneaking = this.client.player.holding_sneak;
const skips_block = sneaking && held !== undefined;
@@ -107,7 +107,7 @@ 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.
// with the states the server will give it, see BlockRules.placement_value, and holding the fluid 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, {