-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Crimson Nylium and Warped Nylium blocks #6481
base: stable
Are you sure you want to change the base?
Conversation
$lightAbove = $world->getFullLightAt((int) $this->position->x, (int) $this->position->y + 1, (int) $this->position->z); | ||
if($lightAbove < 4 && $world->getBlockAt((int) $this->position->x, (int) $this->position->y + 1, (int) $this->position->z)->getLightFilter() >= 2){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use getSide(Facing::UP)
$supportBlock->getTypeId() === BlockTypeIds::CRIMSON_NYLIUM || | ||
$supportBlock->getTypeId() === BlockTypeIds::WARPED_NYLIUM || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to create a new Nylium tag for that is think
|
||
class RedMushroom extends Flowable{ | ||
use StaticSupportTrait; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apply only minimal change, this is unrelated to the PR "add Crimson Nylium".
Open an other PR if you want to change that.
self::register("crimson_nylium", new GrassNylium(new BID(Ids::CRIMSON_NYLIUM), "Crimson Nylium", new Info(BreakInfo::pickaxe(0.4)))); | ||
self::register("warped_nylium", new GrassNylium(new BID(Ids::WARPED_NYLIUM), "Warped Nylium", new Info(BreakInfo::pickaxe(0.4)))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be good to store in an variable the break info
use pocketmine\block\utils\BlockEventHelper; | ||
use pocketmine\item\Item; | ||
|
||
class GrassNylium extends Opaque{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nylium
or NetherNylium
would be better.
Bonemeal logic is missing. Also, this PR should target |
There is no block available for bone meal spreading, roots and fungus is missing |
Roots are implemented. https://github.com/pmmp/PocketMine-MP/blob/stable/src/block/NetherRoots.php |
@@ -983,6 +984,7 @@ private function registerSimpleDeserializers() : void{ | |||
$this->mapSimple(Ids::TUFF_BRICKS, fn() => Blocks::TUFF_BRICKS()); | |||
$this->mapSimple(Ids::UNDYED_SHULKER_BOX, fn() => Blocks::SHULKER_BOX()); | |||
$this->mapSimple(Ids::WARPED_WART_BLOCK, fn() => Blocks::WARPED_WART_BLOCK()); | |||
$this->mapSimple(Ids::WARPED_NYLIUM, fn() => Blocks::WARPED_NYLIUM()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alphabetical order please
@@ -1060,6 +1061,7 @@ private function registerSimpleSerializers() : void{ | |||
$this->mapSimple(Blocks::TUFF(), Ids::TUFF); | |||
$this->mapSimple(Blocks::TUFF_BRICKS(), Ids::TUFF_BRICKS); | |||
$this->mapSimple(Blocks::WARPED_WART_BLOCK(), Ids::WARPED_WART_BLOCK); | |||
$this->mapSimple(Blocks::WARPED_NYLIUM(), Ids::WARPED_NYLIUM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same again here
Introduction
Crimson Nylium
andWarped Nylium
blocks addedTests
I tested this PR by doing the following (tick all that apply):
tests/phpunit
folder)