mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 07:54:19 +00:00
Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/12307996607
This commit is contained in:
commit
f82c8dd3d3
24
.github/workflows/draft-release.yml
vendored
24
.github/workflows/draft-release.yml
vendored
@ -21,7 +21,31 @@ env:
|
||||
PHP_VERSION: "8.2"
|
||||
|
||||
jobs:
|
||||
skip:
|
||||
name: Check whether to ignore this tag
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
outputs:
|
||||
skip: ${{ steps.exists.outputs.exists == 'true' }}
|
||||
|
||||
steps:
|
||||
- name: Check if release already exists
|
||||
id: exists
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
exists=false
|
||||
if [[ "${{ github.ref_type }}" == "tag" ]]; then
|
||||
tag="$(echo "${{ github.ref }}" | cut -d/ -f3-)"
|
||||
if gh release view "$tag" --repo "${{ github.repository }}"; then
|
||||
exists=true
|
||||
fi
|
||||
fi
|
||||
echo exists=$exists >> $GITHUB_OUTPUT
|
||||
|
||||
check:
|
||||
needs: [skip]
|
||||
if: needs.skip.outputs.skip != 'true'
|
||||
name: Check release
|
||||
uses: ./.github/workflows/draft-release-pr-check.yml
|
||||
|
||||
|
@ -765,8 +765,29 @@ final class BlockTypeIds{
|
||||
public const COPPER_TRAPDOOR = 10735;
|
||||
public const CHISELED_COPPER = 10736;
|
||||
public const COPPER_GRATE = 10737;
|
||||
public const PALE_OAK_BUTTON = 10738;
|
||||
public const PALE_OAK_DOOR = 10739;
|
||||
public const PALE_OAK_FENCE = 10740;
|
||||
public const PALE_OAK_FENCE_GATE = 10741;
|
||||
public const PALE_OAK_LEAVES = 10742;
|
||||
public const PALE_OAK_LOG = 10743;
|
||||
public const PALE_OAK_PLANKS = 10744;
|
||||
public const PALE_OAK_PRESSURE_PLATE = 10745;
|
||||
public const PALE_OAK_SIGN = 10746;
|
||||
public const PALE_OAK_SLAB = 10747;
|
||||
public const PALE_OAK_STAIRS = 10748;
|
||||
public const PALE_OAK_TRAPDOOR = 10749;
|
||||
public const PALE_OAK_WALL_SIGN = 10750;
|
||||
public const PALE_OAK_WOOD = 10751;
|
||||
public const RESIN = 10752;
|
||||
public const RESIN_BRICK_SLAB = 10753;
|
||||
public const RESIN_BRICK_STAIRS = 10754;
|
||||
public const RESIN_BRICK_WALL = 10755;
|
||||
public const RESIN_BRICKS = 10756;
|
||||
public const RESIN_CLUMP = 10757;
|
||||
public const CHISELED_RESIN_BRICKS = 10758;
|
||||
|
||||
public const FIRST_UNUSED_BLOCK_ID = 10738;
|
||||
public const FIRST_UNUSED_BLOCK_ID = 10759;
|
||||
|
||||
private static int $nextDynamicId = self::FIRST_UNUSED_BLOCK_ID;
|
||||
|
||||
|
@ -157,6 +157,7 @@ class Leaves extends Transparent{
|
||||
LeavesType::MANGROVE, //TODO: mangrove propagule
|
||||
LeavesType::AZALEA, LeavesType::FLOWERING_AZALEA => null, //TODO: azalea
|
||||
LeavesType::CHERRY => null, //TODO: cherry
|
||||
LeavesType::PALE_OAK => null, //TODO: pale oak
|
||||
})?->asItem();
|
||||
if($sapling !== null){
|
||||
$drops[] = $sapling;
|
||||
|
54
src/block/ResinClump.php
Normal file
54
src/block/ResinClump.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\utils\MultiAnySupportTrait;
|
||||
use pocketmine\block\utils\SupportType;
|
||||
|
||||
final class ResinClump extends Transparent{
|
||||
use MultiAnySupportTrait;
|
||||
|
||||
public function isSolid() : bool{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getSupportType(int $facing) : SupportType{
|
||||
return SupportType::NONE;
|
||||
}
|
||||
|
||||
public function canBeReplaced() : bool{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int[]
|
||||
*/
|
||||
protected function getInitialPlaceFaces(Block $blockReplace) : array{
|
||||
return $blockReplace instanceof ResinClump ? $blockReplace->faces : [];
|
||||
}
|
||||
|
||||
protected function recalculateCollisionBoxes() : array{
|
||||
return [];
|
||||
}
|
||||
}
|
@ -191,6 +191,7 @@ use function strtolower;
|
||||
* @method static Opaque CHISELED_POLISHED_BLACKSTONE()
|
||||
* @method static SimplePillar CHISELED_QUARTZ()
|
||||
* @method static Opaque CHISELED_RED_SANDSTONE()
|
||||
* @method static Opaque CHISELED_RESIN_BRICKS()
|
||||
* @method static Opaque CHISELED_SANDSTONE()
|
||||
* @method static Opaque CHISELED_STONE_BRICKS()
|
||||
* @method static Opaque CHISELED_TUFF()
|
||||
@ -590,6 +591,20 @@ use function strtolower;
|
||||
* @method static Flower OXEYE_DAISY()
|
||||
* @method static PackedIce PACKED_ICE()
|
||||
* @method static Opaque PACKED_MUD()
|
||||
* @method static WoodenButton PALE_OAK_BUTTON()
|
||||
* @method static WoodenDoor PALE_OAK_DOOR()
|
||||
* @method static WoodenFence PALE_OAK_FENCE()
|
||||
* @method static FenceGate PALE_OAK_FENCE_GATE()
|
||||
* @method static Leaves PALE_OAK_LEAVES()
|
||||
* @method static Wood PALE_OAK_LOG()
|
||||
* @method static Planks PALE_OAK_PLANKS()
|
||||
* @method static WoodenPressurePlate PALE_OAK_PRESSURE_PLATE()
|
||||
* @method static FloorSign PALE_OAK_SIGN()
|
||||
* @method static WoodenSlab PALE_OAK_SLAB()
|
||||
* @method static WoodenStairs PALE_OAK_STAIRS()
|
||||
* @method static WoodenTrapdoor PALE_OAK_TRAPDOOR()
|
||||
* @method static WallSign PALE_OAK_WALL_SIGN()
|
||||
* @method static Wood PALE_OAK_WOOD()
|
||||
* @method static DoublePlant PEONY()
|
||||
* @method static PinkPetals PINK_PETALS()
|
||||
* @method static Flower PINK_TULIP()
|
||||
@ -673,6 +688,12 @@ use function strtolower;
|
||||
* @method static Flower RED_TULIP()
|
||||
* @method static Opaque REINFORCED_DEEPSLATE()
|
||||
* @method static Reserved6 RESERVED6()
|
||||
* @method static Opaque RESIN()
|
||||
* @method static Opaque RESIN_BRICKS()
|
||||
* @method static Slab RESIN_BRICK_SLAB()
|
||||
* @method static Stair RESIN_BRICK_STAIRS()
|
||||
* @method static Wall RESIN_BRICK_WALL()
|
||||
* @method static ResinClump RESIN_CLUMP()
|
||||
* @method static DoublePlant ROSE_BUSH()
|
||||
* @method static Sand SAND()
|
||||
* @method static Opaque SANDSTONE()
|
||||
@ -1312,6 +1333,7 @@ final class VanillaBlocks{
|
||||
self::registerBlocksR17();
|
||||
self::registerBlocksR18();
|
||||
self::registerMudBlocks();
|
||||
self::registerResinBlocks();
|
||||
self::registerTuffBlocks();
|
||||
|
||||
self::registerCraftingTables();
|
||||
@ -1359,6 +1381,7 @@ final class VanillaBlocks{
|
||||
WoodType::CRIMSON => VanillaItems::CRIMSON_SIGN(...),
|
||||
WoodType::WARPED => VanillaItems::WARPED_SIGN(...),
|
||||
WoodType::CHERRY => VanillaItems::CHERRY_SIGN(...),
|
||||
WoodType::PALE_OAK => VanillaItems::PALE_OAK_SIGN(...),
|
||||
};
|
||||
self::register($idName("sign"), fn(BID $id) => new FloorSign($id, $name . " Sign", $signBreakInfo, $woodType, $signAsItem), TileSign::class);
|
||||
self::register($idName("wall_sign"), fn(BID $id) => new WallSign($id, $name . " Wall Sign", $signBreakInfo, $woodType, $signAsItem), TileSign::class);
|
||||
@ -1728,6 +1751,18 @@ final class VanillaBlocks{
|
||||
self::register("mud_brick_wall", fn(BID $id) => new Wall($id, "Mud Brick Wall", $mudBricksBreakInfo));
|
||||
}
|
||||
|
||||
private static function registerResinBlocks() : void{
|
||||
self::register("resin", fn(BID $id) => new Opaque($id, "Block of Resin", new Info(BreakInfo::instant())));
|
||||
self::register("resin_clump", fn(BID $id) => new ResinClump($id, "Resin Clump", new Info(BreakInfo::instant())));
|
||||
|
||||
$resinBricksInfo = new Info(BreakInfo::pickaxe(1.5, ToolTier::WOOD));
|
||||
self::register("resin_brick_slab", fn(BID $id) => new Slab($id, "Resin Brick", $resinBricksInfo));
|
||||
self::register("resin_brick_stairs", fn(BID $id) => new Stair($id, "Resin Brick Stairs", $resinBricksInfo));
|
||||
self::register("resin_brick_wall", fn(BID $id) => new Wall($id, "Resin Brick Wall", $resinBricksInfo));
|
||||
self::register("resin_bricks", fn(BID $id) => new Opaque($id, "Resin Bricks", $resinBricksInfo));
|
||||
self::register("chiseled_resin_bricks", fn(BID $id) => new Opaque($id, "Chiseled Resin Bricks", $resinBricksInfo));
|
||||
}
|
||||
|
||||
private static function registerTuffBlocks() : void{
|
||||
$tuffBreakInfo = new Info(BreakInfo::pickaxe(1.5, ToolTier::WOOD, 30.0));
|
||||
|
||||
|
@ -34,6 +34,7 @@ enum LeavesType{
|
||||
case AZALEA;
|
||||
case FLOWERING_AZALEA;
|
||||
case CHERRY;
|
||||
case PALE_OAK;
|
||||
|
||||
public function getDisplayName() : string{
|
||||
return match($this){
|
||||
@ -46,7 +47,8 @@ enum LeavesType{
|
||||
self::MANGROVE => "Mangrove",
|
||||
self::AZALEA => "Azalea",
|
||||
self::FLOWERING_AZALEA => "Flowering Azalea",
|
||||
self::CHERRY => "Cherry"
|
||||
self::CHERRY => "Cherry",
|
||||
self::PALE_OAK => "Pale Oak",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ enum WoodType{
|
||||
case CRIMSON;
|
||||
case WARPED;
|
||||
case CHERRY;
|
||||
case PALE_OAK;
|
||||
|
||||
public function getDisplayName() : string{
|
||||
return match($this){
|
||||
@ -47,6 +48,7 @@ enum WoodType{
|
||||
self::CRIMSON => "Crimson",
|
||||
self::WARPED => "Warped",
|
||||
self::CHERRY => "Cherry",
|
||||
self::PALE_OAK => "Pale Oak",
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -121,6 +121,7 @@ use pocketmine\block\RedstoneOre;
|
||||
use pocketmine\block\RedstoneRepeater;
|
||||
use pocketmine\block\RedstoneTorch;
|
||||
use pocketmine\block\RedstoneWire;
|
||||
use pocketmine\block\ResinClump;
|
||||
use pocketmine\block\RuntimeBlockStateRegistry;
|
||||
use pocketmine\block\Sapling;
|
||||
use pocketmine\block\SeaPickle;
|
||||
@ -703,6 +704,20 @@ final class BlockObjectToStateSerializer implements BlockStateSerializer{
|
||||
$this->mapSlab(Blocks::OAK_SLAB(), Ids::OAK_SLAB, Ids::OAK_DOUBLE_SLAB);
|
||||
$this->mapStairs(Blocks::OAK_STAIRS(), Ids::OAK_STAIRS);
|
||||
|
||||
$this->map(Blocks::PALE_OAK_BUTTON(), fn(WoodenButton $block) => Helper::encodeButton($block, new Writer(Ids::PALE_OAK_BUTTON)));
|
||||
$this->map(Blocks::PALE_OAK_DOOR(), fn(WoodenDoor $block) => Helper::encodeDoor($block, new Writer(Ids::PALE_OAK_DOOR)));
|
||||
$this->map(Blocks::PALE_OAK_FENCE_GATE(), fn(FenceGate $block) => Helper::encodeFenceGate($block, new Writer(Ids::PALE_OAK_FENCE_GATE)));
|
||||
$this->map(Blocks::PALE_OAK_PRESSURE_PLATE(), fn(WoodenPressurePlate $block) => Helper::encodeSimplePressurePlate($block, new Writer(Ids::PALE_OAK_PRESSURE_PLATE)));
|
||||
$this->map(Blocks::PALE_OAK_SIGN(), fn(FloorSign $block) => Helper::encodeFloorSign($block, new Writer(Ids::PALE_OAK_STANDING_SIGN)));
|
||||
$this->map(Blocks::PALE_OAK_TRAPDOOR(), fn(WoodenTrapdoor $block) => Helper::encodeTrapdoor($block, new Writer(Ids::PALE_OAK_TRAPDOOR)));
|
||||
$this->map(Blocks::PALE_OAK_WALL_SIGN(), fn(WallSign $block) => Helper::encodeWallSign($block, new Writer(Ids::PALE_OAK_WALL_SIGN)));
|
||||
$this->mapLog(Blocks::PALE_OAK_LOG(), Ids::PALE_OAK_LOG, Ids::STRIPPED_PALE_OAK_LOG);
|
||||
$this->mapLog(Blocks::PALE_OAK_WOOD(), Ids::PALE_OAK_WOOD, Ids::STRIPPED_PALE_OAK_WOOD);
|
||||
$this->mapSimple(Blocks::PALE_OAK_FENCE(), Ids::PALE_OAK_FENCE);
|
||||
$this->mapSimple(Blocks::PALE_OAK_PLANKS(), Ids::PALE_OAK_PLANKS);
|
||||
$this->mapSlab(Blocks::PALE_OAK_SLAB(), Ids::PALE_OAK_SLAB, Ids::PALE_OAK_DOUBLE_SLAB);
|
||||
$this->mapStairs(Blocks::PALE_OAK_STAIRS(), Ids::PALE_OAK_STAIRS);
|
||||
|
||||
$this->map(Blocks::SPRUCE_BUTTON(), fn(WoodenButton $block) => Helper::encodeButton($block, new Writer(Ids::SPRUCE_BUTTON)));
|
||||
$this->map(Blocks::SPRUCE_DOOR(), fn(WoodenDoor $block) => Helper::encodeDoor($block, new Writer(Ids::SPRUCE_DOOR)));
|
||||
$this->map(Blocks::SPRUCE_FENCE_GATE(), fn(FenceGate $block) => Helper::encodeFenceGate($block, new Writer(Ids::SPRUCE_FENCE_GATE)));
|
||||
@ -739,6 +754,7 @@ final class BlockObjectToStateSerializer implements BlockStateSerializer{
|
||||
$this->map(Blocks::CHERRY_LEAVES(), fn(Leaves $block) => Helper::encodeLeaves($block, new Writer(Ids::CHERRY_LEAVES)));
|
||||
$this->map(Blocks::FLOWERING_AZALEA_LEAVES(), fn(Leaves $block) => Helper::encodeLeaves($block, new Writer(Ids::AZALEA_LEAVES_FLOWERED)));
|
||||
$this->map(Blocks::MANGROVE_LEAVES(), fn(Leaves $block) => Helper::encodeLeaves($block, new Writer(Ids::MANGROVE_LEAVES)));
|
||||
$this->map(Blocks::PALE_OAK_LEAVES(), fn(Leaves $block) => Helper::encodeLeaves($block, new Writer(Ids::PALE_OAK_LEAVES)));
|
||||
|
||||
//legacy mess
|
||||
$this->map(Blocks::ACACIA_LEAVES(), fn(Leaves $block) => Helper::encodeLeaves($block, new Writer(Ids::ACACIA_LEAVES)));
|
||||
@ -794,6 +810,7 @@ final class BlockObjectToStateSerializer implements BlockStateSerializer{
|
||||
$this->mapSimple(Blocks::CHISELED_NETHER_BRICKS(), Ids::CHISELED_NETHER_BRICKS);
|
||||
$this->mapSimple(Blocks::CHISELED_POLISHED_BLACKSTONE(), Ids::CHISELED_POLISHED_BLACKSTONE);
|
||||
$this->mapSimple(Blocks::CHISELED_RED_SANDSTONE(), Ids::CHISELED_RED_SANDSTONE);
|
||||
$this->mapSimple(Blocks::CHISELED_RESIN_BRICKS(), Ids::CHISELED_RESIN_BRICKS);
|
||||
$this->mapSimple(Blocks::CHISELED_SANDSTONE(), Ids::CHISELED_SANDSTONE);
|
||||
$this->mapSimple(Blocks::CHISELED_STONE_BRICKS(), Ids::CHISELED_STONE_BRICKS);
|
||||
$this->mapSimple(Blocks::CHISELED_TUFF(), Ids::CHISELED_TUFF);
|
||||
@ -1035,6 +1052,8 @@ final class BlockObjectToStateSerializer implements BlockStateSerializer{
|
||||
$this->mapSimple(Blocks::RED_SANDSTONE(), Ids::RED_SANDSTONE);
|
||||
$this->mapSimple(Blocks::REINFORCED_DEEPSLATE(), Ids::REINFORCED_DEEPSLATE);
|
||||
$this->mapSimple(Blocks::RESERVED6(), Ids::RESERVED6);
|
||||
$this->mapSimple(Blocks::RESIN(), Ids::RESIN_BLOCK);
|
||||
$this->mapSimple(Blocks::RESIN_BRICKS(), Ids::RESIN_BRICKS);
|
||||
$this->mapSimple(Blocks::SAND(), Ids::SAND);
|
||||
$this->mapSimple(Blocks::SANDSTONE(), Ids::SANDSTONE);
|
||||
$this->mapSimple(Blocks::SCULK(), Ids::SCULK);
|
||||
@ -1719,6 +1738,13 @@ final class BlockObjectToStateSerializer implements BlockStateSerializer{
|
||||
$this->mapStairs(Blocks::RED_SANDSTONE_STAIRS(), Ids::RED_SANDSTONE_STAIRS);
|
||||
$this->map(Blocks::RED_SANDSTONE_WALL(), fn(Wall $block) => Helper::encodeWall($block, Writer::create(Ids::RED_SANDSTONE_WALL)));
|
||||
$this->map(Blocks::RED_TORCH(), fn(Torch $block) => Helper::encodeTorch($block, Writer::create(Ids::COLORED_TORCH_RED)));
|
||||
$this->mapSlab(Blocks::RESIN_BRICK_SLAB(), Ids::RESIN_BRICK_SLAB, Ids::RESIN_BRICK_DOUBLE_SLAB);
|
||||
$this->map(Blocks::RESIN_BRICK_STAIRS(), fn(Stair $block) => Helper::encodeStairs($block, new Writer(Ids::RESIN_BRICK_STAIRS)));
|
||||
$this->map(Blocks::RESIN_BRICK_WALL(), fn(Wall $block) => Helper::encodeWall($block, Writer::create(Ids::RESIN_BRICK_WALL)));
|
||||
$this->map(Blocks::RESIN_CLUMP(), function(ResinClump $block) : Writer{
|
||||
return Writer::create(Ids::RESIN_CLUMP)
|
||||
->writeFacingFlags($block->getFaces());
|
||||
});
|
||||
$this->map(Blocks::ROSE_BUSH(), fn(DoublePlant $block) => Helper::encodeDoublePlant($block, Writer::create(Ids::ROSE_BUSH)));
|
||||
$this->mapSlab(Blocks::SANDSTONE_SLAB(), Ids::SANDSTONE_SLAB, Ids::SANDSTONE_DOUBLE_SLAB);
|
||||
$this->mapStairs(Blocks::SANDSTONE_STAIRS(), Ids::SANDSTONE_STAIRS);
|
||||
|
@ -608,6 +608,20 @@ final class BlockStateToObjectDeserializer implements BlockStateDeserializer{
|
||||
$this->mapSlab(Ids::OAK_SLAB, Ids::OAK_DOUBLE_SLAB, fn() => Blocks::OAK_SLAB());
|
||||
$this->mapStairs(Ids::OAK_STAIRS, fn() => Blocks::OAK_STAIRS());
|
||||
|
||||
$this->map(Ids::PALE_OAK_BUTTON, fn(Reader $in) => Helper::decodeButton(Blocks::PALE_OAK_BUTTON(), $in));
|
||||
$this->map(Ids::PALE_OAK_DOOR, fn(Reader $in) => Helper::decodeDoor(Blocks::PALE_OAK_DOOR(), $in));
|
||||
$this->map(Ids::PALE_OAK_FENCE_GATE, fn(Reader $in) => Helper::decodeFenceGate(Blocks::PALE_OAK_FENCE_GATE(), $in));
|
||||
$this->map(Ids::PALE_OAK_PRESSURE_PLATE, fn(Reader $in) => Helper::decodeSimplePressurePlate(Blocks::PALE_OAK_PRESSURE_PLATE(), $in));
|
||||
$this->map(Ids::PALE_OAK_STANDING_SIGN, fn(Reader $in) => Helper::decodeFloorSign(Blocks::PALE_OAK_SIGN(), $in));
|
||||
$this->map(Ids::PALE_OAK_TRAPDOOR, fn(Reader $in) => Helper::decodeTrapdoor(Blocks::PALE_OAK_TRAPDOOR(), $in));
|
||||
$this->map(Ids::PALE_OAK_WALL_SIGN, fn(Reader $in) => Helper::decodeWallSign(Blocks::PALE_OAK_WALL_SIGN(), $in));
|
||||
$this->mapLog(Ids::PALE_OAK_LOG, Ids::STRIPPED_PALE_OAK_LOG, fn() => Blocks::PALE_OAK_LOG());
|
||||
$this->mapLog(Ids::PALE_OAK_WOOD, Ids::STRIPPED_PALE_OAK_WOOD, fn() => Blocks::PALE_OAK_WOOD());
|
||||
$this->mapSimple(Ids::PALE_OAK_FENCE, fn() => Blocks::PALE_OAK_FENCE());
|
||||
$this->mapSimple(Ids::PALE_OAK_PLANKS, fn() => Blocks::PALE_OAK_PLANKS());
|
||||
$this->mapSlab(Ids::PALE_OAK_SLAB, Ids::PALE_OAK_DOUBLE_SLAB, fn() => Blocks::PALE_OAK_SLAB());
|
||||
$this->mapStairs(Ids::PALE_OAK_STAIRS, fn() => Blocks::PALE_OAK_STAIRS());
|
||||
|
||||
$this->map(Ids::SPRUCE_BUTTON, fn(Reader $in) => Helper::decodeButton(Blocks::SPRUCE_BUTTON(), $in));
|
||||
$this->map(Ids::SPRUCE_DOOR, fn(Reader $in) => Helper::decodeDoor(Blocks::SPRUCE_DOOR(), $in));
|
||||
$this->map(Ids::SPRUCE_FENCE_GATE, fn(Reader $in) => Helper::decodeFenceGate(Blocks::SPRUCE_FENCE_GATE(), $in));
|
||||
@ -647,6 +661,7 @@ final class BlockStateToObjectDeserializer implements BlockStateDeserializer{
|
||||
$this->map(Ids::JUNGLE_LEAVES, fn(Reader $in) => Helper::decodeLeaves(Blocks::JUNGLE_LEAVES(), $in));
|
||||
$this->map(Ids::MANGROVE_LEAVES, fn(Reader $in) => Helper::decodeLeaves(Blocks::MANGROVE_LEAVES(), $in));
|
||||
$this->map(Ids::OAK_LEAVES, fn(Reader $in) => Helper::decodeLeaves(Blocks::OAK_LEAVES(), $in));
|
||||
$this->map(Ids::PALE_OAK_LEAVES, fn(Reader $in) => Helper::decodeLeaves(Blocks::PALE_OAK_LEAVES(), $in));
|
||||
$this->map(Ids::SPRUCE_LEAVES, fn(Reader $in) => Helper::decodeLeaves(Blocks::SPRUCE_LEAVES(), $in));
|
||||
}
|
||||
|
||||
@ -720,6 +735,7 @@ final class BlockStateToObjectDeserializer implements BlockStateDeserializer{
|
||||
$this->mapSimple(Ids::CHISELED_NETHER_BRICKS, fn() => Blocks::CHISELED_NETHER_BRICKS());
|
||||
$this->mapSimple(Ids::CHISELED_POLISHED_BLACKSTONE, fn() => Blocks::CHISELED_POLISHED_BLACKSTONE());
|
||||
$this->mapSimple(Ids::CHISELED_RED_SANDSTONE, fn() => Blocks::CHISELED_RED_SANDSTONE());
|
||||
$this->mapSimple(Ids::CHISELED_RESIN_BRICKS, fn() => Blocks::CHISELED_RESIN_BRICKS());
|
||||
$this->mapSimple(Ids::CHISELED_SANDSTONE, fn() => Blocks::CHISELED_SANDSTONE());
|
||||
$this->mapSimple(Ids::CHISELED_STONE_BRICKS, fn() => Blocks::CHISELED_STONE_BRICKS());
|
||||
$this->mapSimple(Ids::CHISELED_TUFF, fn() => Blocks::CHISELED_TUFF());
|
||||
@ -957,6 +973,8 @@ final class BlockStateToObjectDeserializer implements BlockStateDeserializer{
|
||||
$this->mapSimple(Ids::REDSTONE_BLOCK, fn() => Blocks::REDSTONE());
|
||||
$this->mapSimple(Ids::REINFORCED_DEEPSLATE, fn() => Blocks::REINFORCED_DEEPSLATE());
|
||||
$this->mapSimple(Ids::RESERVED6, fn() => Blocks::RESERVED6());
|
||||
$this->mapSimple(Ids::RESIN_BLOCK, fn() => Blocks::RESIN());
|
||||
$this->mapSimple(Ids::RESIN_BRICKS, fn() => Blocks::RESIN_BRICKS());
|
||||
$this->mapSimple(Ids::SAND, fn() => Blocks::SAND());
|
||||
$this->mapSimple(Ids::SANDSTONE, fn() => Blocks::SANDSTONE());
|
||||
$this->mapSimple(Ids::SCULK, fn() => Blocks::SCULK());
|
||||
@ -1567,6 +1585,10 @@ final class BlockStateToObjectDeserializer implements BlockStateDeserializer{
|
||||
return Blocks::SUGARCANE()
|
||||
->setAge($in->readBoundedInt(StateNames::AGE, 0, 15));
|
||||
});
|
||||
$this->mapSlab(Ids::RESIN_BRICK_SLAB, Ids::RESIN_BRICK_DOUBLE_SLAB, fn() => Blocks::RESIN_BRICK_SLAB());
|
||||
$this->mapStairs(Ids::RESIN_BRICK_STAIRS, fn() => Blocks::RESIN_BRICK_STAIRS());
|
||||
$this->map(Ids::RESIN_BRICK_WALL, fn(Reader $in) => Helper::decodeWall(Blocks::RESIN_BRICK_WALL(), $in));
|
||||
$this->map(Ids::RESIN_CLUMP, fn(Reader $in) => Blocks::RESIN_CLUMP()->setFaces($in->readFacingFlags()));
|
||||
$this->mapSlab(Ids::SANDSTONE_SLAB, Ids::SANDSTONE_DOUBLE_SLAB, fn() => Blocks::SANDSTONE_SLAB());
|
||||
$this->mapStairs(Ids::SANDSTONE_STAIRS, fn() => Blocks::SANDSTONE_STAIRS());
|
||||
$this->map(Ids::SANDSTONE_WALL, fn(Reader $in) => Helper::decodeWall(Blocks::SANDSTONE_WALL(), $in));
|
||||
|
@ -151,6 +151,7 @@ final class ItemSerializerDeserializerRegistrar{
|
||||
$this->map1to1Block(Ids::JUNGLE_DOOR, Blocks::JUNGLE_DOOR());
|
||||
$this->map1to1Block(Ids::MANGROVE_DOOR, Blocks::MANGROVE_DOOR());
|
||||
$this->map1to1Block(Ids::NETHER_WART, Blocks::NETHER_WART());
|
||||
$this->map1to1Block(Ids::PALE_OAK_DOOR, Blocks::PALE_OAK_DOOR());
|
||||
$this->map1to1Block(Ids::REPEATER, Blocks::REDSTONE_REPEATER());
|
||||
$this->map1to1Block(Ids::SOUL_CAMPFIRE, Blocks::SOUL_CAMPFIRE());
|
||||
$this->map1to1Block(Ids::SPRUCE_DOOR, Blocks::SPRUCE_DOOR());
|
||||
@ -331,6 +332,7 @@ final class ItemSerializerDeserializerRegistrar{
|
||||
$this->map1to1Item(Ids::OAK_BOAT, Items::OAK_BOAT());
|
||||
$this->map1to1Item(Ids::OAK_SIGN, Items::OAK_SIGN());
|
||||
$this->map1to1Item(Ids::PAINTING, Items::PAINTING());
|
||||
$this->map1to1Item(Ids::PALE_OAK_SIGN, Items::PALE_OAK_SIGN());
|
||||
$this->map1to1Item(Ids::PAPER, Items::PAPER());
|
||||
$this->map1to1Item(Ids::PHANTOM_MEMBRANE, Items::PHANTOM_MEMBRANE());
|
||||
$this->map1to1Item(Ids::PITCHER_POD, Items::PITCHER_POD());
|
||||
@ -354,6 +356,7 @@ final class ItemSerializerDeserializerRegistrar{
|
||||
$this->map1to1Item(Ids::RAW_IRON, Items::RAW_IRON());
|
||||
$this->map1to1Item(Ids::RECOVERY_COMPASS, Items::RECOVERY_COMPASS());
|
||||
$this->map1to1Item(Ids::REDSTONE, Items::REDSTONE_DUST());
|
||||
$this->map1to1Item(Ids::RESIN_BRICK, Items::RESIN_BRICK());
|
||||
$this->map1to1Item(Ids::RIB_ARMOR_TRIM_SMITHING_TEMPLATE, Items::RIB_ARMOR_TRIM_SMITHING_TEMPLATE());
|
||||
$this->map1to1Item(Ids::ROTTEN_FLESH, Items::ROTTEN_FLESH());
|
||||
$this->map1to1Item(Ids::SALMON, Items::RAW_SALMON());
|
||||
|
@ -328,8 +328,10 @@ final class ItemTypeIds{
|
||||
public const END_CRYSTAL = 20289;
|
||||
public const ICE_BOMB = 20290;
|
||||
public const RECOVERY_COMPASS = 20291;
|
||||
public const PALE_OAK_SIGN = 20292;
|
||||
public const RESIN_BRICK = 20293;
|
||||
|
||||
public const FIRST_UNUSED_ITEM_ID = 20292;
|
||||
public const FIRST_UNUSED_ITEM_ID = 20294;
|
||||
|
||||
private static int $nextDynamicId = self::FIRST_UNUSED_ITEM_ID;
|
||||
|
||||
|
@ -243,6 +243,7 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("chiseled_polished_blackstone", fn() => Blocks::CHISELED_POLISHED_BLACKSTONE());
|
||||
$result->registerBlock("chiseled_quartz", fn() => Blocks::CHISELED_QUARTZ());
|
||||
$result->registerBlock("chiseled_red_sandstone", fn() => Blocks::CHISELED_RED_SANDSTONE());
|
||||
$result->registerBlock("chiseled_resin_bricks", fn() => Blocks::CHISELED_RESIN_BRICKS());
|
||||
$result->registerBlock("chiseled_sandstone", fn() => Blocks::CHISELED_SANDSTONE());
|
||||
$result->registerBlock("chiseled_stone_bricks", fn() => Blocks::CHISELED_STONE_BRICKS());
|
||||
$result->registerBlock("chiseled_tuff", fn() => Blocks::CHISELED_TUFF());
|
||||
@ -872,6 +873,19 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("oxeye_daisy", fn() => Blocks::OXEYE_DAISY());
|
||||
$result->registerBlock("packed_ice", fn() => Blocks::PACKED_ICE());
|
||||
$result->registerBlock("packed_mud", fn() => Blocks::PACKED_MUD());
|
||||
$result->registerBlock("pale_oak_button", fn() => Blocks::PALE_OAK_BUTTON());
|
||||
$result->registerBlock("pale_oak_door", fn() => Blocks::PALE_OAK_DOOR());
|
||||
$result->registerBlock("pale_oak_fence", fn() => Blocks::PALE_OAK_FENCE());
|
||||
$result->registerBlock("pale_oak_fence_gate", fn() => Blocks::PALE_OAK_FENCE_GATE());
|
||||
$result->registerBlock("pale_oak_leaves", fn() => Blocks::PALE_OAK_LEAVES());
|
||||
$result->registerBlock("pale_oak_log", fn() => Blocks::PALE_OAK_LOG()->setStripped(false));
|
||||
$result->registerBlock("pale_oak_planks", fn() => Blocks::PALE_OAK_PLANKS());
|
||||
$result->registerBlock("pale_oak_pressure_plate", fn() => Blocks::PALE_OAK_PRESSURE_PLATE());
|
||||
$result->registerBlock("pale_oak_sign", fn() => Blocks::PALE_OAK_SIGN());
|
||||
$result->registerBlock("pale_oak_slab", fn() => Blocks::PALE_OAK_SLAB());
|
||||
$result->registerBlock("pale_oak_stairs", fn() => Blocks::PALE_OAK_STAIRS());
|
||||
$result->registerBlock("pale_oak_trapdoor", fn() => Blocks::PALE_OAK_TRAPDOOR());
|
||||
$result->registerBlock("pale_oak_wood", fn() => Blocks::PALE_OAK_WOOD()->setStripped(false));
|
||||
$result->registerBlock("peony", fn() => Blocks::PEONY());
|
||||
$result->registerBlock("pink_petals", fn() => Blocks::PINK_PETALS());
|
||||
$result->registerBlock("pink_tulip", fn() => Blocks::PINK_TULIP());
|
||||
@ -972,6 +986,13 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("repeater", fn() => Blocks::REDSTONE_REPEATER());
|
||||
$result->registerBlock("repeater_block", fn() => Blocks::REDSTONE_REPEATER());
|
||||
$result->registerBlock("reserved6", fn() => Blocks::RESERVED6());
|
||||
$result->registerBlock("resin", fn() => Blocks::RESIN());
|
||||
$result->registerBlock("resin_block", fn() => Blocks::RESIN());
|
||||
$result->registerBlock("resin_brick_slab", fn() => Blocks::RESIN_BRICK_SLAB());
|
||||
$result->registerBlock("resin_brick_stairs", fn() => Blocks::RESIN_BRICK_STAIRS());
|
||||
$result->registerBlock("resin_brick_wall", fn() => Blocks::RESIN_BRICK_WALL());
|
||||
$result->registerBlock("resin_bricks", fn() => Blocks::RESIN_BRICKS());
|
||||
$result->registerBlock("resin_clump", fn() => Blocks::RESIN_CLUMP());
|
||||
$result->registerBlock("rooted_dirt", fn() => Blocks::DIRT()->setDirtType(DirtType::ROOTED));
|
||||
$result->registerBlock("rose", fn() => Blocks::POPPY());
|
||||
$result->registerBlock("rose_bush", fn() => Blocks::ROSE_BUSH());
|
||||
@ -1084,6 +1105,8 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("stripped_mangrove_wood", fn() => Blocks::MANGROVE_WOOD()->setStripped(true));
|
||||
$result->registerBlock("stripped_oak_log", fn() => Blocks::OAK_LOG()->setStripped(true));
|
||||
$result->registerBlock("stripped_oak_wood", fn() => Blocks::OAK_WOOD()->setStripped(true));
|
||||
$result->registerBlock("stripped_pale_oak_log", fn() => Blocks::PALE_OAK_LOG()->setStripped(true));
|
||||
$result->registerBlock("stripped_pale_oak_wood", fn() => Blocks::PALE_OAK_WOOD()->setStripped(true));
|
||||
$result->registerBlock("stripped_spruce_log", fn() => Blocks::SPRUCE_LOG()->setStripped(true));
|
||||
$result->registerBlock("stripped_spruce_wood", fn() => Blocks::SPRUCE_WOOD()->setStripped(true));
|
||||
$result->registerBlock("stripped_warped_hyphae", fn() => Blocks::WARPED_HYPHAE()->setStripped(true));
|
||||
@ -1484,6 +1507,7 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->register("recovery_compass", fn() => Items::RECOVERY_COMPASS());
|
||||
$result->register("redstone", fn() => Items::REDSTONE_DUST());
|
||||
$result->register("redstone_dust", fn() => Items::REDSTONE_DUST());
|
||||
$result->register("resin_brick", fn() => Items::RESIN_BRICK());
|
||||
$result->register("rib_armor_trim_smithing_template", fn() => Items::RIB_ARMOR_TRIM_SMITHING_TEMPLATE());
|
||||
$result->register("rotten_flesh", fn() => Items::ROTTEN_FLESH());
|
||||
$result->register("salmon", fn() => Items::RAW_SALMON());
|
||||
|
@ -243,6 +243,7 @@ use function strtolower;
|
||||
* @method static Boat OAK_BOAT()
|
||||
* @method static ItemBlockWallOrFloor OAK_SIGN()
|
||||
* @method static PaintingItem PAINTING()
|
||||
* @method static ItemBlockWallOrFloor PALE_OAK_SIGN()
|
||||
* @method static Item PAPER()
|
||||
* @method static Item PHANTOM_MEMBRANE()
|
||||
* @method static PitcherPod PITCHER_POD()
|
||||
@ -286,6 +287,7 @@ use function strtolower;
|
||||
* @method static Record RECORD_WARD()
|
||||
* @method static Item RECOVERY_COMPASS()
|
||||
* @method static Redstone REDSTONE_DUST()
|
||||
* @method static Item RESIN_BRICK()
|
||||
* @method static Item RIB_ARMOR_TRIM_SMITHING_TEMPLATE()
|
||||
* @method static RottenFlesh ROTTEN_FLESH()
|
||||
* @method static Item SCUTE()
|
||||
@ -535,6 +537,7 @@ final class VanillaItems{
|
||||
});
|
||||
self::register("oak_sign", fn(IID $id) => new ItemBlockWallOrFloor($id, Blocks::OAK_SIGN(), Blocks::OAK_WALL_SIGN()));
|
||||
self::register("painting", fn(IID $id) => new PaintingItem($id, "Painting"));
|
||||
self::register("pale_oak_sign", fn(IID $id) => new ItemBlockWallOrFloor($id, Blocks::PALE_OAK_SIGN(), Blocks::PALE_OAK_WALL_SIGN()));
|
||||
self::register("paper", fn(IID $id) => new Item($id, "Paper"));
|
||||
self::register("phantom_membrane", fn(IID $id) => new Item($id, "Phantom Membrane"));
|
||||
self::register("pitcher_pod", fn(IID $id) => new PitcherPod($id, "Pitcher Pod"));
|
||||
@ -577,6 +580,7 @@ final class VanillaItems{
|
||||
self::register("record_ward", fn(IID $id) => new Record($id, RecordType::DISK_WARD, "Record Ward"));
|
||||
self::register("recovery_compass", fn(IID $id) => new Item($id, "Recovery Compass"));
|
||||
self::register("redstone_dust", fn(IID $id) => new Redstone($id, "Redstone"));
|
||||
self::register("resin_brick", fn(IID $id) => new Item($id, "Resin Brick"));
|
||||
self::register("rotten_flesh", fn(IID $id) => new RottenFlesh($id, "Rotten Flesh"));
|
||||
self::register("scute", fn(IID $id) => new Item($id, "Scute"));
|
||||
self::register("shears", fn(IID $id) => new Shears($id, "Shears", [EnchantmentTags::SHEARS]));
|
||||
|
@ -60,6 +60,11 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/block/VanillaBlocks.php
|
||||
|
||||
-
|
||||
message: "#^Creating callable from a non\\-native static method pocketmine\\\\item\\\\VanillaItems\\:\\:PALE_OAK_SIGN\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/block/VanillaBlocks.php
|
||||
|
||||
-
|
||||
message: "#^Creating callable from a non\\-native static method pocketmine\\\\item\\\\VanillaItems\\:\\:SPRUCE_SIGN\\(\\)\\.$#"
|
||||
count: 1
|
||||
|
@ -112,6 +112,7 @@
|
||||
"CHISELED_POLISHED_BLACKSTONE": 1,
|
||||
"CHISELED_QUARTZ": 3,
|
||||
"CHISELED_RED_SANDSTONE": 1,
|
||||
"CHISELED_RESIN_BRICKS": 1,
|
||||
"CHISELED_SANDSTONE": 1,
|
||||
"CHISELED_STONE_BRICKS": 1,
|
||||
"CHISELED_TUFF": 1,
|
||||
@ -511,6 +512,20 @@
|
||||
"OXEYE_DAISY": 1,
|
||||
"PACKED_ICE": 1,
|
||||
"PACKED_MUD": 1,
|
||||
"PALE_OAK_BUTTON": 12,
|
||||
"PALE_OAK_DOOR": 32,
|
||||
"PALE_OAK_FENCE": 1,
|
||||
"PALE_OAK_FENCE_GATE": 16,
|
||||
"PALE_OAK_LEAVES": 4,
|
||||
"PALE_OAK_LOG": 6,
|
||||
"PALE_OAK_PLANKS": 1,
|
||||
"PALE_OAK_PRESSURE_PLATE": 2,
|
||||
"PALE_OAK_SIGN": 16,
|
||||
"PALE_OAK_SLAB": 3,
|
||||
"PALE_OAK_STAIRS": 8,
|
||||
"PALE_OAK_TRAPDOOR": 16,
|
||||
"PALE_OAK_WALL_SIGN": 4,
|
||||
"PALE_OAK_WOOD": 6,
|
||||
"PEONY": 2,
|
||||
"PINK_PETALS": 16,
|
||||
"PINK_TULIP": 1,
|
||||
@ -594,6 +609,12 @@
|
||||
"RED_TULIP": 1,
|
||||
"REINFORCED_DEEPSLATE": 1,
|
||||
"RESERVED6": 1,
|
||||
"RESIN": 1,
|
||||
"RESIN_BRICKS": 1,
|
||||
"RESIN_BRICK_SLAB": 3,
|
||||
"RESIN_BRICK_STAIRS": 8,
|
||||
"RESIN_BRICK_WALL": 162,
|
||||
"RESIN_CLUMP": 64,
|
||||
"ROSE_BUSH": 2,
|
||||
"SAND": 1,
|
||||
"SANDSTONE": 1,
|
||||
@ -754,6 +775,8 @@
|
||||
"NOTE_BLOCK": "pocketmine\\block\\tile\\Note",
|
||||
"OAK_SIGN": "pocketmine\\block\\tile\\Sign",
|
||||
"OAK_WALL_SIGN": "pocketmine\\block\\tile\\Sign",
|
||||
"PALE_OAK_SIGN": "pocketmine\\block\\tile\\Sign",
|
||||
"PALE_OAK_WALL_SIGN": "pocketmine\\block\\tile\\Sign",
|
||||
"POTION_CAULDRON": "pocketmine\\block\\tile\\Cauldron",
|
||||
"REDSTONE_COMPARATOR": "pocketmine\\block\\tile\\Comparator",
|
||||
"SHULKER_BOX": "pocketmine\\block\\tile\\ShulkerBox",
|
||||
|
Loading…
x
Reference in New Issue
Block a user