mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Implemented Paintings (#2073)
This supports vanilla placement of paintings, with overlap and collision checking. Paintings are removed when a block is placed inside them or if any of their supporting blocks are removed. As per vanilla, a random painting is chosen from the largest subset that will fit into the given space.
This commit is contained in:
@ -30,6 +30,8 @@ use pocketmine\block\Block;
|
||||
use pocketmine\block\BlockFactory;
|
||||
use pocketmine\block\Water;
|
||||
use pocketmine\entity\object\ExperienceOrb;
|
||||
use pocketmine\entity\object\Painting;
|
||||
use pocketmine\entity\object\PaintingMotive;
|
||||
use pocketmine\entity\projectile\Arrow;
|
||||
use pocketmine\entity\projectile\Egg;
|
||||
use pocketmine\entity\projectile\Snowball;
|
||||
@ -231,6 +233,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
Entity::registerEntity(ExperienceOrb::class, false, ['XPOrb', 'minecraft:xp_orb']);
|
||||
Entity::registerEntity(FallingSand::class, false, ['FallingSand', 'minecraft:falling_block']);
|
||||
Entity::registerEntity(Item::class, false, ['Item', 'minecraft:item']);
|
||||
Entity::registerEntity(Painting::class, false, ['Painting', 'minecraft:painting']);
|
||||
Entity::registerEntity(PrimedTNT::class, false, ['PrimedTnt', 'PrimedTNT', 'minecraft:tnt']);
|
||||
Entity::registerEntity(Snowball::class, false, ['Snowball', 'minecraft:snowball']);
|
||||
Entity::registerEntity(Squid::class, false, ['Squid', 'minecraft:squid']);
|
||||
@ -241,6 +244,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
|
||||
Attribute::init();
|
||||
Effect::init();
|
||||
PaintingMotive::init();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user