Added mangrove roots and muddy mangrove roots

This commit is contained in:
Dylan K. Taylor 2022-07-23 17:20:23 +01:00
parent 17635e770b
commit 38e495babf
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
6 changed files with 46 additions and 1 deletions

View File

@ -701,6 +701,8 @@ final class BlockTypeIds{
public const POWDER_SNOW_CAULDRON = 10674;
public const CHORUS_FLOWER = 10675;
public const CHORUS_PLANT = 10676;
public const MANGROVE_ROOTS = 10677;
public const MUDDY_MANGROVE_ROOTS = 10678;
public const FIRST_UNUSED_BLOCK_ID = 10677;
public const FIRST_UNUSED_BLOCK_ID = 10679;
}

View File

@ -0,0 +1,31 @@
<?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;
final class MangroveRoots extends Transparent{
public function getFlammability() : int{ return 5; }
public function getFlameEncouragement() : int{ return 5; }
}

View File

@ -476,6 +476,7 @@ use function mb_strtolower;
* @method static Wood MANGROVE_LOG()
* @method static Planks MANGROVE_PLANKS()
* @method static WoodenPressurePlate MANGROVE_PRESSURE_PLATE()
* @method static MangroveRoots MANGROVE_ROOTS()
* @method static FloorSign MANGROVE_SIGN()
* @method static WoodenSlab MANGROVE_SLAB()
* @method static WoodenStairs MANGROVE_STAIRS()
@ -496,6 +497,7 @@ use function mb_strtolower;
* @method static Stair MOSSY_STONE_BRICK_STAIRS()
* @method static Wall MOSSY_STONE_BRICK_WALL()
* @method static Opaque MUD()
* @method static Transparent MUDDY_MANGROVE_ROOTS()
* @method static Opaque MUD_BRICKS()
* @method static Slab MUD_BRICK_SLAB()
* @method static Stair MUD_BRICK_STAIRS()
@ -1165,6 +1167,10 @@ final class VanillaBlocks{
BreakInfo::instant(),
));
self::register("mangrove_roots", new MangroveRoots(new BID(Ids::MANGROVE_ROOTS), "Mangrove Roots", new BreakInfo(0.7, ToolType::AXE)));
//TODO: muddy mangrove roots are supposed to be axis-rotatable (Bedrock parity issue https://bugs.mojang.com/browse/MCPE-153721)
self::register("muddy_mangrove_roots", new Transparent(new BID(Ids::MUDDY_MANGROVE_ROOTS), "Muddy Mangrove Roots", new BreakInfo(0.7, ToolType::SHOVEL)));
self::registerBlocksR13();
self::registerBlocksR14();
self::registerBlocksR16();

View File

@ -507,10 +507,12 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
$this->mapSimple(Blocks::MAGMA(), Ids::MAGMA);
$this->mapSimple(Blocks::MANGROVE_FENCE(), Ids::MANGROVE_FENCE);
$this->mapSimple(Blocks::MANGROVE_PLANKS(), Ids::MANGROVE_PLANKS);
$this->mapSimple(Blocks::MANGROVE_ROOTS(), Ids::MANGROVE_ROOTS);
$this->mapSimple(Blocks::MELON(), Ids::MELON_BLOCK);
$this->mapSimple(Blocks::MONSTER_SPAWNER(), Ids::MOB_SPAWNER);
$this->mapSimple(Blocks::MOSSY_COBBLESTONE(), Ids::MOSSY_COBBLESTONE);
$this->mapSimple(Blocks::MUD(), Ids::MUD);
$this->mapSimple(Blocks::MUDDY_MANGROVE_ROOTS(), Ids::MUDDY_MANGROVE_ROOTS);
$this->mapSimple(Blocks::MUD_BRICKS(), Ids::MUD_BRICKS);
$this->mapSimple(Blocks::MYCELIUM(), Ids::MYCELIUM);
$this->mapSimple(Blocks::NETHERITE(), Ids::NETHERITE_BLOCK);

View File

@ -357,10 +357,12 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
$this->map(Ids::MAGMA, fn() => Blocks::MAGMA());
$this->map(Ids::MANGROVE_FENCE, fn() => Blocks::MANGROVE_FENCE());
$this->map(Ids::MANGROVE_PLANKS, fn() => Blocks::MANGROVE_PLANKS());
$this->map(Ids::MANGROVE_ROOTS, fn() => Blocks::MANGROVE_ROOTS());
$this->map(Ids::MELON_BLOCK, fn() => Blocks::MELON());
$this->map(Ids::MOB_SPAWNER, fn() => Blocks::MONSTER_SPAWNER());
$this->map(Ids::MOSSY_COBBLESTONE, fn() => Blocks::MOSSY_COBBLESTONE());
$this->map(Ids::MUD, fn() => Blocks::MUD());
$this->map(Ids::MUDDY_MANGROVE_ROOTS, fn() => Blocks::MUDDY_MANGROVE_ROOTS());
$this->map(Ids::MUD_BRICKS, fn() => Blocks::MUD_BRICKS());
$this->map(Ids::MYCELIUM, fn() => Blocks::MYCELIUM());
$this->map(Ids::NETHER_BRICK, fn() => Blocks::NETHER_BRICKS());

View File

@ -750,6 +750,7 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("mangrove_log", fn() => Blocks::MANGROVE_LOG()->setStripped(false));
$result->registerBlock("mangrove_planks", fn() => Blocks::MANGROVE_PLANKS());
$result->registerBlock("mangrove_pressure_plate", fn() => Blocks::MANGROVE_PRESSURE_PLATE());
$result->registerBlock("mangrove_roots", fn() => Blocks::MANGROVE_ROOTS());
$result->registerBlock("mangrove_sign", fn() => Blocks::MANGROVE_SIGN());
$result->registerBlock("mangrove_slab", fn() => Blocks::MANGROVE_SLAB());
$result->registerBlock("mangrove_stairs", fn() => Blocks::MANGROVE_STAIRS());
@ -779,6 +780,7 @@ final class StringToItemParser extends StringToTParser{
$result->registerBlock("mud_brick_slab", fn() => Blocks::MUD_BRICK_SLAB());
$result->registerBlock("mud_brick_stairs", fn() => Blocks::MUD_BRICK_STAIRS());
$result->registerBlock("mud_brick_wall", fn() => Blocks::MUD_BRICK_WALL());
$result->registerBlock("muddy_mangrove_roots", fn() => Blocks::MUDDY_MANGROVE_ROOTS());
$result->registerBlock("mushroom_stem", fn() => Blocks::MUSHROOM_STEM());
$result->registerBlock("mycelium", fn() => Blocks::MYCELIUM());
$result->registerBlock("nether_brick_block", fn() => Blocks::NETHER_BRICKS());