PocketMine-MP 5.18.1 git-9381fc4172e5dce4cada1cb356050c8a2ab57b94
|
Public Attributes | |
const | EMPTY_STATE_ID = (BlockTypeIds::AIR << self::INTERNAL_STATE_DATA_BITS) | (-7482769108513497636 & self::INTERNAL_STATE_DATA_MASK) |
const | INTERNAL_STATE_DATA_BITS = 11 |
const | INTERNAL_STATE_DATA_MASK = ~(~0 << self::INTERNAL_STATE_DATA_BITS) |
Protected Member Functions | |
describeBlockOnlyState (RuntimeDataDescriber $w) | |
getAdjacentSupportType (int $facing) | |
getSupportingFace () | |
getXpDropAmount () | |
recalculateCollisionBoxes () | |
Protected Attributes | |
array | $collisionBoxes = null |
string | $fallbackName |
BlockIdentifier | $idInfo |
array | $patterns = [] |
Position | $position |
BlockTypeInfo | $typeInfo |
Definition at line 40 of file BaseBanner.php.
|
inherited |
|
inherited |
Returns a direction vector describing which way an entity intersecting this block should be pushed. This is used by liquids to push entities in liquid currents.
The returned vector is summed with vectors from every other block the entity is intersecting, and normalized to produce a final direction vector.
WARNING: This will not be called if Block::hasEntityCollision()
does not return true!
Reimplemented in pocketmine\block\Liquid.
pocketmine\block\BaseBanner::asItem | ( | ) |
Returns the block as an item. Block-only state such as facing, powered/unpowered, open/closed, etc., is discarded. Block-item state such as colour, wood type, etc. is preserved. Complex state properties stored in the tile data (e.g. inventory) are discarded.
Reimplemented from pocketmine\block\Block.
Definition at line 152 of file BaseBanner.php.
|
inherited |
Returns whether this block blocks direct sky light from passing through it. This is independent from the light filter value, which is used during propagation.
In most cases, this is the same as isTransparent(); however, some special cases exist such as leaves and cobwebs, which don't have any additional effect on light propagation, but don't allow direct sky light to pass through.
Reimplemented in pocketmine\block\Cobweb, and pocketmine\block\Leaves.
|
inherited |
Returns whether fire lit on this block will burn indefinitely.
Reimplemented in pocketmine\block\Bedrock, pocketmine\block\Magma, and pocketmine\block\Netherrack.
|
inherited |
Returns whether this block can be destroyed by liquid flowing into its cell.
Reimplemented in pocketmine\block\Flowable, pocketmine\block\Liquid, and pocketmine\block\UnderwaterTorch.
|
inherited |
Returns whether this block can be placed when obtained as an item.
Reimplemented in pocketmine\block\Air, and pocketmine\block\UnknownBlock.
|
inherited |
Returns whether this block can replace the given block in the given placement conditions. This is used to allow slabs of the same type to combine into double slabs.
Reimplemented in pocketmine\block\Candle, pocketmine\block\Light, pocketmine\block\PinkPetals, pocketmine\block\SeaPickle, pocketmine\block\Slab, and pocketmine\block\WaterLily.
|
inherited |
Returns whether this block can be replaced by another block placed in the same position.
Reimplemented in pocketmine\block\Air, pocketmine\block\BaseFire, pocketmine\block\DoubleTallGrass, pocketmine\block\GlowLichen, pocketmine\block\Light, pocketmine\block\Liquid, pocketmine\block\SnowLayer, and pocketmine\block\Vine.
|
inherited |
Returns whether entities can climb up this block.
Reimplemented in pocketmine\block\CaveVines, pocketmine\block\Ladder, pocketmine\block\NetherVines, and pocketmine\block\Vine.
|
inherited |
Returns whether any of the block's collision boxes intersect with the given AxisAlignedBB.
Definition at line 839 of file Block.php.
References pocketmine\math\AxisAlignedBB\intersectsWith().
|
inherited |
Describes properties of this block which apply to both the block and item form of the block. Examples of suitable properties include colour, skull type, and any other information which IS kept when the block is mined or block-picked.
The method implementation must NOT use conditional logic to determine which properties are written. It must always write the same properties in the same order, regardless of the current state of the block.
Reimplemented in pocketmine\block\AmethystCluster, pocketmine\block\Anvil, pocketmine\block\Dirt, pocketmine\block\Froglight, pocketmine\block\Light, pocketmine\block\MobHead, pocketmine\block\RedMushroomBlock, pocketmine\block\Sponge, pocketmine\block\TNT, pocketmine\block\UnknownBlock, and pocketmine\block\Wood.
Definition at line 299 of file Block.php.
Referenced by pocketmine\block\Block\__construct().
|
protectedinherited |
Describes properties of this block which apply only to the block form of the block. Examples of suitable properties include facing, open/closed, powered/unpowered, on/off, and any other information which IS NOT kept when the block is mined or block-picked.
The method implementation must NOT use conditional logic to determine which properties are written. It must always write the same properties in the same order, regardless of the current state of the block.
Reimplemented in pocketmine\block\Anvil, pocketmine\block\Bamboo, pocketmine\block\BambooSapling, pocketmine\block\Barrel, pocketmine\block\Bed, pocketmine\block\Bedrock, pocketmine\block\Bell, pocketmine\block\BigDripleafHead, pocketmine\block\BrewingStand, pocketmine\block\Button, pocketmine\block\Cake, pocketmine\block\Candle, pocketmine\block\CaveVines, pocketmine\block\ChiseledBookshelf, pocketmine\block\CocoaBlock, pocketmine\block\DaylightSensor, pocketmine\block\DetectorRail, pocketmine\block\Door, pocketmine\block\DoublePitcherCrop, pocketmine\block\DoublePlant, pocketmine\block\EndPortalFrame, pocketmine\block\Farmland, pocketmine\block\FenceGate, pocketmine\block\FillableCauldron, pocketmine\block\FloorCoralFan, pocketmine\block\Furnace, pocketmine\block\GlowLichen, pocketmine\block\Hopper, pocketmine\block\ItemFrame, pocketmine\block\Lantern, pocketmine\block\Leaves, pocketmine\block\Lectern, pocketmine\block\Lever, pocketmine\block\Liquid, pocketmine\block\MobHead, pocketmine\block\NetherPortal, pocketmine\block\PinkPetals, pocketmine\block\Rail, pocketmine\block\RedstoneComparator, pocketmine\block\RedstoneLamp, pocketmine\block\RedstoneRepeater, pocketmine\block\RedstoneTorch, pocketmine\block\Sapling, pocketmine\block\SeaPickle, pocketmine\block\ShulkerBox, pocketmine\block\SimplePressurePlate, pocketmine\block\Slab, pocketmine\block\SmallDripleaf, pocketmine\block\SnowLayer, pocketmine\block\Stair, pocketmine\block\Stem, pocketmine\block\StraightOnlyRail, pocketmine\block\TNT, pocketmine\block\Torch, pocketmine\block\TorchflowerCrop, pocketmine\block\Trapdoor, pocketmine\block\Tripwire, pocketmine\block\TripwireHook, pocketmine\block\Vine, pocketmine\block\Wall, and pocketmine\block\WallCoralFan.
Definition at line 311 of file Block.php.
Referenced by pocketmine\block\Block\__construct().
|
inherited |
|
protectedinherited |
|
inherited |
Returns a list of blocks that this block is part of. In most cases, only contains the block itself, but in cases such as double plants, beds and doors, will contain both halves.
Reimplemented in pocketmine\block\Bed, pocketmine\block\Door, pocketmine\block\DoublePlant, and pocketmine\block\SmallDripleaf.
|
inherited |
|
inherited |
|
finalinherited |
Returns an array of collision bounding boxes for this block. These are used for:
|
inherited |
Returns an array of Item objects to be dropped
Reimplemented in pocketmine\block\Bed, pocketmine\block\Door, pocketmine\block\DoublePlant, pocketmine\block\GlowLichen, pocketmine\block\Lectern, pocketmine\block\NetherPortal, pocketmine\block\UnknownBlock, and pocketmine\block\Vine.
pocketmine\block\BaseBanner::getDropsForCompatibleTool | ( | Item | $item | ) |
Returns an array of Items to be dropped when the block is broken using the correct tool type.
Reimplemented from pocketmine\block\Block.
Definition at line 135 of file BaseBanner.php.
|
inherited |
Returns the items dropped by this block when broken with an incorrect tool type (or tool with a too-low tier).
Reimplemented in pocketmine\block\AmethystCluster, pocketmine\block\Bell, pocketmine\block\DeadBush, pocketmine\block\DoubleTallGrass, and pocketmine\block\HangingRoots.
|
inherited |
Returns tags that represent the type of item being enchanted and are used to determine what enchantments can be applied to the item of this block during in-game enchanting (enchanting table, anvil, fishing, etc.).
|
inherited |
Returns the chance that the block will catch fire from nearby fire sources. Higher values lead to faster catching fire.
Reimplemented in pocketmine\block\BaseBigDripleaf, pocketmine\block\Bookshelf, pocketmine\block\Carpet, pocketmine\block\Coal, pocketmine\block\DeadBush, pocketmine\block\DoublePlant, pocketmine\block\DriedKelp, pocketmine\block\FenceGate, pocketmine\block\Flower, pocketmine\block\GlowLichen, pocketmine\block\HayBale, pocketmine\block\Leaves, pocketmine\block\MangroveRoots, pocketmine\block\PinkPetals, pocketmine\block\Planks, pocketmine\block\SmallDripleaf, pocketmine\block\TNT, pocketmine\block\Vine, pocketmine\block\WitherRose, pocketmine\block\Wood, pocketmine\block\WoodenFence, pocketmine\block\WoodenSlab, pocketmine\block\WoodenStairs, and pocketmine\block\Wool.
|
inherited |
Returns the base flammability of this block. Higher values lead to the block burning away more quickly.
Reimplemented in pocketmine\block\BaseBigDripleaf, pocketmine\block\Bookshelf, pocketmine\block\Carpet, pocketmine\block\Coal, pocketmine\block\DeadBush, pocketmine\block\DoublePlant, pocketmine\block\DriedKelp, pocketmine\block\FenceGate, pocketmine\block\Flower, pocketmine\block\GlowLichen, pocketmine\block\HayBale, pocketmine\block\Leaves, pocketmine\block\Lectern, pocketmine\block\MangroveRoots, pocketmine\block\PinkPetals, pocketmine\block\Planks, pocketmine\block\SmallDripleaf, pocketmine\block\TNT, pocketmine\block\Vine, pocketmine\block\WitherRose, pocketmine\block\Wood, pocketmine\block\WoodenFence, pocketmine\block\WoodenSlab, pocketmine\block\WoodenStairs, and pocketmine\block\Wool.
|
inherited |
Returns a multiplier applied to the velocity of entities moving on top of this block. A higher value will make the block more slippery (like ice).
Reimplemented in pocketmine\block\BlueIce, pocketmine\block\Ice, pocketmine\block\PackedIce, and pocketmine\block\Slime.
|
inherited |
Returns the time in ticks which the block will fuel a furnace for.
Reimplemented in pocketmine\block\Barrel, pocketmine\block\BaseSign, pocketmine\block\Bookshelf, pocketmine\block\CartographyTable, pocketmine\block\Chest, pocketmine\block\Coal, pocketmine\block\CraftingTable, pocketmine\block\DaylightSensor, pocketmine\block\DriedKelp, pocketmine\block\FenceGate, pocketmine\block\FletchingTable, pocketmine\block\Jukebox, pocketmine\block\Note, pocketmine\block\Planks, pocketmine\block\Sapling, pocketmine\block\SmithingTable, pocketmine\block\Wood, pocketmine\block\WoodenButton, pocketmine\block\WoodenDoor, pocketmine\block\WoodenFence, pocketmine\block\WoodenPressurePlate, pocketmine\block\WoodenSlab, pocketmine\block\WoodenStairs, and pocketmine\block\WoodenTrapdoor.
|
inherited |
|
inherited |
|
inherited |
Returns the amount of light this block will filter out when light passes through this block. This value is used in light spread calculation.
Reimplemented in pocketmine\block\Ice, pocketmine\block\TintedGlass, and pocketmine\block\Water.
|
inherited |
Returns the amount of light emitted by this block.
Reimplemented in pocketmine\block\AmethystCluster, pocketmine\block\Beacon, pocketmine\block\BrownMushroom, pocketmine\block\Candle, pocketmine\block\CaveVines, pocketmine\block\DragonEgg, pocketmine\block\EnderChest, pocketmine\block\EndPortalFrame, pocketmine\block\EndRod, pocketmine\block\Froglight, pocketmine\block\Furnace, pocketmine\block\GlowingObsidian, pocketmine\block\GlowLichen, pocketmine\block\Glowstone, pocketmine\block\Lantern, pocketmine\block\Lava, pocketmine\block\LavaCauldron, pocketmine\block\Light, pocketmine\block\LitPumpkin, pocketmine\block\Magma, pocketmine\block\NetherPortal, pocketmine\block\RedstoneLamp, pocketmine\block\RedstoneOre, pocketmine\block\RedstoneTorch, pocketmine\block\SeaLantern, pocketmine\block\SeaPickle, pocketmine\block\SoulFire, and pocketmine\block\Torch.
pocketmine\block\BaseBanner::getMaxStackSize | ( | ) |
Returns the maximum number of this block that can fit into a single item stack.
Reimplemented from pocketmine\block\Block.
Definition at line 72 of file BaseBanner.php.
|
inherited |
Returns an additional fractional vector to shift the block model's position by based on the current position. Used to randomize position of things like bamboo canes and tall grass.
Reimplemented in pocketmine\block\Bamboo.
|
inherited |
pocketmine\block\BaseBanner::getPatterns | ( | ) |
Definition at line 80 of file BaseBanner.php.
pocketmine\block\BaseBanner::getPickedItem | ( | bool | $addUserData = false | ) |
Returns the item that players will equip when middle-clicking on this block. If addUserData is true, additional data may be added, such as banner patterns, chest contents, etc.
Reimplemented from pocketmine\block\Block.
Definition at line 144 of file BaseBanner.php.
|
inherited |
Returns the Block on the side $side, works like Vector3::getSide()
Definition at line 768 of file Block.php.
References pocketmine\world\Position\getWorld(), and pocketmine\world\Position\isValid().
Referenced by pocketmine\block\Fence\readStateFromWorld(), and pocketmine\block\Thin\readStateFromWorld().
|
inherited |
Returns an array of Items to be dropped when the block is broken using a compatible Silk Touch-enchanted tool.
Reimplemented in pocketmine\block\InfestedStone, and pocketmine\block\RedMushroomBlock.
pocketmine\block\BaseBanner::getSupportType | ( | int | $facing | ) |
Returns the type of support that the block can provide on the given face. This is used to determine whether blocks placed on the given face can be supported by this block.
Reimplemented from pocketmine\block\Block.
Definition at line 107 of file BaseBanner.php.
|
inherited |
Returns a type ID that identifies this type of block. This allows comparing basic block types, e.g. wool, stone, glass, etc. Type ID will not change for a given block type.
Information such as colour, powered, open/closed, etc. is not included in this ID. If you want to get a state ID that includes this information, use Block::getStateId()
instead.
Definition at line 156 of file Block.php.
Referenced by pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer\map(), and pocketmine\item\Bucket\onInteractBlock().
|
inherited |
|
protectedinherited |
Returns how much XP this block will drop when broken with an appropriate tool.
Reimplemented in pocketmine\block\CoalOre, pocketmine\block\DiamondOre, pocketmine\block\EmeraldOre, pocketmine\block\LapisOre, pocketmine\block\MonsterSpawner, pocketmine\block\NetherQuartzOre, pocketmine\block\RedstoneOre, and pocketmine\block\Sculk.
|
inherited |
|
inherited |
Returns whether the block has actions to be executed when an entity enters its cell (full cube space).
Reimplemented in pocketmine\block\BaseFire, pocketmine\block\BigDripleafHead, pocketmine\block\Cactus, pocketmine\block\CaveVines, pocketmine\block\Cobweb, pocketmine\block\Ladder, pocketmine\block\LavaCauldron, pocketmine\block\Liquid, pocketmine\block\Magma, pocketmine\block\NetherVines, pocketmine\block\PressurePlate, pocketmine\block\SweetBerryBush, pocketmine\block\Vine, pocketmine\block\WaterCauldron, pocketmine\block\WitherRose, and pocketmine\block\WoodenButton.
|
inherited |
Returns whether the given block has the same type ID as this one.
Definition at line 184 of file Block.php.
Referenced by pocketmine\block\Chest\onPostPlace(), and pocketmine\block\Liquid\onScheduledUpdate().
|
inherited |
Returns whether this block type has the given type tag. Type tags are used as a dynamic way to tag blocks as having certain properties, allowing type checks which are more dynamic than hardcoding a bunch of IDs or a bunch of instanceof checks.
For example, grass blocks, dirt, farmland, podzol and mycelium are all dirt-like blocks, and support the placement of blocks like flowers, so they have a common tag which allows them to be identified as such.
|
inherited |
Returns whether Silk Touch enchanted tools will cause this block to drop as itself.
Reimplemented in pocketmine\block\AmethystCluster, pocketmine\block\BaseCoral, pocketmine\block\BlueIce, pocketmine\block\Bookshelf, pocketmine\block\CaveVines, pocketmine\block\ChiseledBookshelf, pocketmine\block\Clay, pocketmine\block\CoalOre, pocketmine\block\Cobweb, pocketmine\block\CopperOre, pocketmine\block\CoralBlock, pocketmine\block\DeadBush, pocketmine\block\DiamondOre, pocketmine\block\EmeraldOre, pocketmine\block\EnderChest, pocketmine\block\GildedBlackstone, pocketmine\block\Glass, pocketmine\block\GlassPane, pocketmine\block\Glowstone, pocketmine\block\GoldOre, pocketmine\block\Grass, pocketmine\block\GrassPath, pocketmine\block\Gravel, pocketmine\block\Ice, pocketmine\block\InfestedStone, pocketmine\block\IronOre, pocketmine\block\LapisOre, pocketmine\block\Leaves, pocketmine\block\Melon, pocketmine\block\MushroomStem, pocketmine\block\Mycelium, pocketmine\block\NetherGoldOre, pocketmine\block\NetherQuartzOre, pocketmine\block\NetherVines, pocketmine\block\PackedIce, pocketmine\block\Podzol, pocketmine\block\RedMushroomBlock, pocketmine\block\RedstoneOre, pocketmine\block\Sculk, pocketmine\block\SeaLantern, and pocketmine\block\Snow.
|
inherited |
|
inherited |
pocketmine\block\BaseBanner::isSolid | ( | ) |
No one is sure what the meaning of this property actually is. It's borrowed from Minecraft Java Edition, and is used by various blocks for support checks.
Things like signs and banners are considered "solid" despite having no collision box, and things like skulls and flower pots are considered non-solid despite obviously being "solid" in the conventional, real-world sense.
Reimplemented from pocketmine\block\Block.
Definition at line 68 of file BaseBanner.php.
|
inherited |
Returns whether this block allows any light to pass through it.
Reimplemented from pocketmine\block\Block.
Reimplemented in pocketmine\block\Slab.
Definition at line 34 of file Transparent.php.
Called when this block is attacked (left-clicked) by a player attempting to start breaking it in survival.
Reimplemented in pocketmine\block\DragonEgg, pocketmine\block\ItemFrame, and pocketmine\block\Lectern.
|
inherited |
Do the actions needed so the block is broken with the Item
Item[] | &$returnedItems | Items to be added to the target's inventory (or dropped, if full) |
Reimplemented in pocketmine\block\Ice, pocketmine\block\Jukebox, and pocketmine\block\TNT.
|
inherited |
Called when an entity's bounding box clips inside this block's cell. Note that the entity may not be intersecting with the collision box or bounding box.
WARNING: This will not be called if Block::hasEntityCollision()
returns false.
Reimplemented in pocketmine\block\BaseFire, pocketmine\block\BigDripleafHead, pocketmine\block\Cactus, pocketmine\block\CaveVines, pocketmine\block\Cobweb, pocketmine\block\Ladder, pocketmine\block\Lava, pocketmine\block\LavaCauldron, pocketmine\block\Magma, pocketmine\block\NetherPortal, pocketmine\block\NetherVines, pocketmine\block\PressurePlate, pocketmine\block\SweetBerryBush, pocketmine\block\Vine, pocketmine\block\Water, pocketmine\block\WaterCauldron, and pocketmine\block\WitherRose.
|
inherited |
Called when an entity lands on this block (usually due to falling).
Reimplemented in pocketmine\block\Bed, pocketmine\block\Farmland, pocketmine\block\HayBale, and pocketmine\block\Slime.
|
inherited |
Called when this block is burned away by being on fire.
Reimplemented in pocketmine\block\TNT.
|
inherited |
Do actions when interacted by Item. Returns if it has done anything
Vector3 | $clickVector | Exact position where the click occurred, relative to the block's integer position |
Item[] | &$returnedItems | Items to be added to the target's inventory (or dropped, if the inventory is full) |
Reimplemented in pocketmine\block\Anvil, pocketmine\block\Bamboo, pocketmine\block\BambooSapling, pocketmine\block\Barrel, pocketmine\block\BaseBigDripleaf, pocketmine\block\BaseCake, pocketmine\block\BaseSign, pocketmine\block\Bed, pocketmine\block\Bell, pocketmine\block\BrewingStand, pocketmine\block\Button, pocketmine\block\Cake, pocketmine\block\CakeWithCandle, pocketmine\block\CartographyTable, pocketmine\block\Cauldron, pocketmine\block\CaveVines, pocketmine\block\ChemistryTable, pocketmine\block\Chest, pocketmine\block\ChiseledBookshelf, pocketmine\block\CocoaBlock, pocketmine\block\CraftingTable, pocketmine\block\Crops, pocketmine\block\DaylightSensor, pocketmine\block\Dirt, pocketmine\block\Door, pocketmine\block\DoublePitcherCrop, pocketmine\block\DragonEgg, pocketmine\block\EnchantingTable, pocketmine\block\EnderChest, pocketmine\block\FenceGate, pocketmine\block\FlowerPot, pocketmine\block\Furnace, pocketmine\block\GlowLichen, pocketmine\block\Grass, pocketmine\block\Hopper, pocketmine\block\ItemFrame, pocketmine\block\Jukebox, pocketmine\block\LavaCauldron, pocketmine\block\Lectern, pocketmine\block\Lever, pocketmine\block\Light, pocketmine\block\Loom, pocketmine\block\NetherVines, pocketmine\block\PinkPetals, pocketmine\block\PitcherCrop, pocketmine\block\PotionCauldron, pocketmine\block\Pumpkin, pocketmine\block\RedstoneComparator, pocketmine\block\RedstoneOre, pocketmine\block\RedstoneRepeater, pocketmine\block\Sapling, pocketmine\block\SeaPickle, pocketmine\block\ShulkerBox, pocketmine\block\SmallDripleaf, pocketmine\block\SmithingTable, pocketmine\block\Stonecutter, pocketmine\block\Sugarcane, pocketmine\block\SweetBerryBush, pocketmine\block\TNT, pocketmine\block\TorchflowerCrop, pocketmine\block\Trapdoor, pocketmine\block\WaterCauldron, and pocketmine\block\Wood.
pocketmine\block\BaseBanner::onNearbyBlockChange | ( | ) |
Called when this block or a block immediately adjacent to it changes state.
Reimplemented from pocketmine\block\Block.
Definition at line 129 of file BaseBanner.php.
|
inherited |
Called immediately after the block has been placed in the world. Since placement uses a block transaction, some things may not be possible until after the transaction has been executed.
Reimplemented in pocketmine\block\BaseRail, pocketmine\block\BaseSign, and pocketmine\block\Chest.
|
inherited |
Called when a projectile collides with one of this block's collision boxes.
Reimplemented in pocketmine\block\Bell, pocketmine\block\BigDripleafHead, pocketmine\block\ChorusFlower, and pocketmine\block\TNT.
|
inherited |
Called when this block is randomly updated due to chunk ticking. WARNING: This will not be called if Block::ticksRandomly()
does not return true!
Reimplemented in pocketmine\block\Bamboo, pocketmine\block\BambooSapling, pocketmine\block\BuddingAmethyst, pocketmine\block\Cactus, pocketmine\block\CaveVines, pocketmine\block\ChorusFlower, pocketmine\block\CocoaBlock, pocketmine\block\Crops, pocketmine\block\DoublePitcherCrop, pocketmine\block\Farmland, pocketmine\block\Fire, pocketmine\block\FrostedIce, pocketmine\block\Grass, pocketmine\block\Ice, pocketmine\block\Leaves, pocketmine\block\Mycelium, pocketmine\block\NetherVines, pocketmine\block\NetherWartPlant, pocketmine\block\PitcherCrop, pocketmine\block\RedstoneOre, pocketmine\block\Sapling, pocketmine\block\SnowLayer, pocketmine\block\Stem, pocketmine\block\Sugarcane, pocketmine\block\SweetBerryBush, pocketmine\block\TorchflowerCrop, and pocketmine\block\Vine.
|
inherited |
Called when this block is updated by the delayed blockupdate scheduler in the world.
Reimplemented in pocketmine\block\BaseCoral, pocketmine\block\BigDripleafHead, pocketmine\block\BrewingStand, pocketmine\block\Button, pocketmine\block\CoralBlock, pocketmine\block\DaylightSensor, pocketmine\block\Fire, pocketmine\block\FrostedIce, pocketmine\block\Furnace, pocketmine\block\Hopper, pocketmine\block\Lectern, pocketmine\block\Liquid, pocketmine\block\MonsterSpawner, and pocketmine\block\PressurePlate.
pocketmine\block\BaseBanner::place | ( | BlockTransaction | $tx, |
Item | $item, | ||
Block | $blockReplace, | ||
Block | $blockClicked, | ||
int | $face, | ||
Vector3 | $clickVector, | ||
?Player | $player = null |
||
) |
Generates a block transaction to set all blocks affected by placing this block. Usually this is just the block itself, but may be multiple blocks in some cases (such as doors).
BlockTransaction | $tx | Blocks to be set should be added to this transaction (do not modify thr world directly) |
Item | $item | Item used to place the block |
Block | $blockReplace | Block expected to be replaced |
Block | $blockClicked | Block that was clicked using the item |
int | $face | Face of the clicked block which was clicked |
Vector3 | $clickVector | Exact position inside the clicked block where the click occurred, relative to the block's position |
Player | null | $player | Player who placed the block, or null if it was not a player |
Reimplemented from pocketmine\block\Block.
Reimplemented in pocketmine\block\FloorBanner, and pocketmine\block\WallBanner.
Definition at line 115 of file BaseBanner.php.
|
finalinherited |
pocketmine\block\BaseBanner::readStateFromWorld | ( | ) |
Called when this block is created, set, or has a neighbouring block update, to re-detect dynamic properties which are not saved in the blockstate ID. If any such properties are updated, don't forget to clear things like AABB caches if necessary.
A replacement block may be returned. This is useful if the block type changed due to reading of world data (e.g. data from a block entity).
Reimplemented from pocketmine\block\Block.
Definition at line 49 of file BaseBanner.php.
References pocketmine\block\BaseBanner\setPatterns().
|
protected |
Reimplemented from pocketmine\block\Block.
Definition at line 103 of file BaseBanner.php.
pocketmine\block\BaseBanner::setPatterns | ( | array | $patterns | ) |
BannerPatternLayer[] | $patterns |
@phpstan-param list<BannerPatternLayer> $patterns
Definition at line 90 of file BaseBanner.php.
Referenced by pocketmine\block\BaseBanner\readStateFromWorld().
|
inherited |
Returns whether random block updates will be done on this block.
Reimplemented in pocketmine\block\Bamboo, pocketmine\block\BambooSapling, pocketmine\block\BuddingAmethyst, pocketmine\block\Cactus, pocketmine\block\CaveVines, pocketmine\block\ChorusFlower, pocketmine\block\CocoaBlock, pocketmine\block\Crops, pocketmine\block\DoublePitcherCrop, pocketmine\block\Farmland, pocketmine\block\Fire, pocketmine\block\Grass, pocketmine\block\Ice, pocketmine\block\Leaves, pocketmine\block\Mycelium, pocketmine\block\NetherVines, pocketmine\block\NetherWartPlant, pocketmine\block\PitcherCrop, pocketmine\block\RedMushroom, pocketmine\block\RedstoneOre, pocketmine\block\Sapling, pocketmine\block\SnowLayer, pocketmine\block\Stem, pocketmine\block\Sugarcane, pocketmine\block\SweetBerryBush, pocketmine\block\TorchflowerCrop, and pocketmine\block\Vine.
pocketmine\block\BaseBanner::writeStateToWorld | ( | ) |
Writes information about the block into the world. This writes the blockstate ID into the chunk, and creates and/or removes tiles as necessary.
Note: Do not call this directly. Pass the block to World::setBlock()
instead.
Reimplemented from pocketmine\block\Block.
Definition at line 60 of file BaseBanner.php.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
Definition at line 47 of file BaseBanner.php.
|
protectedinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |