PrivateconstructorThis function can't be called in read-only mode.
This function can't be called in early-execution mode.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
Optionalamount: numberDefaults to: 1
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
Optionalstates: Record<string, string | number | boolean>This function can't be called in read-only mode.
This function can't be called in early-execution mode.
// Script by WavePlayz
import { world } from "@minecraft/server";
/**
Function to check if a given block is red wool
@param {import('@minecraft/server').Block} block
@returns true if a given block is red wool
/
function isRedWool(block) {
// Define the type id of block we are checking for
let typeId = "wool";
// Define the block state we are looking for
// In this case, we want the color to be red
let states = { color: "red" };
// Check if the block matches the specified type and states
// The 'matches' method returns true if the block is of the specified type and has the specified states
return block.matches(typeId, states);
}
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
StaticresolveOptionalstates: Record<string, string | number | boolean>This function can't be called in read-only mode.
This function can't be called in early-execution mode.
Remarks
Write Privilege
This function can't be called in read-only mode.
Throws
This function can throw errors.
World Ready
This function can't be called in early-execution mode.