Rename engine to cubi

This commit is contained in:
2026-11-03 17:17:37 -03:00
parent 68b78f053a
commit 98fa45ebd1
109 changed files with 643 additions and 788 deletions
+3 -3
View File
@@ -326,7 +326,7 @@ export interface ServerWorld {
// an item lying still at x y z, which players can pick up after half a second, like a new minecraft ItemEntity
spawn_item(x: number, y: number, z: number, item: ItemStack): EntityRef;
// the entities whose boxes touch the box between two corners, like minecraft's getEntitiesOfClass. only ones of type
// when given, like "bworld:item" for items lying around. players aren't among them, they're in ctx.players
// when given, like "cubi:item" for items lying around. players aren't among them, they're in ctx.players
entities_in(from: Position, to: Position, type?: Id): EntityRef[];
// uses item on face of the block at x y z the way a player holding it would, like a deployer: the block's
// on_interact, or the item's on_use, or placing it. a player that isn't anyone does it, standing in the block in
@@ -456,7 +456,7 @@ export interface Player {
set_worn(key: string, items: ItemStack[]): void;
teleport(x: number, y: number, z: number): void;
// health and hunger, like minecraft: 20 each, saturation is never above hunger. max_health is the
// bworld:max_health attribute
// cubi:max_health attribute
readonly health: number;
readonly max_health: number;
readonly food: number;
@@ -468,7 +468,7 @@ export interface Player {
feed(nutrition: number, saturation_modifier: number): void;
// tires them out: 4 costs a point of saturation, or of hunger once it's gone
add_exhaustion(amount: number): void;
// their stats, like minecraft's attributes: "bworld:attack_damage", "bworld:attack_speed", "bworld:max_health"...
// their stats, like minecraft's attributes: "cubi:attack_damage", "cubi:attack_speed", "cubi:max_health"...
// see docs/modding/entities/players.md. modifiers aren't saved, they're gone when the player leaves
attribute(id: Id): number;
// replaces one with the same id on that attribute
+1 -1
View File
@@ -189,7 +189,7 @@ export interface SharedContext {
}
export interface SharedWorld {
// undefined when the chunk isn't loaded, "bworld:air" for air
// undefined when the chunk isn't loaded, "cubi:air" for air
get_block(x: number, y: number, z: number): Id | undefined;
get_state(x: number, y: number, z: number, name: string): number | undefined;
// changing what a block is tells the blocks beside it, see BlockRules.on_neighbor_change