Skip to content
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

Implement missing Nether Blocks #6276

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8df4b27
reupload all changed files from src/block
pandaaaBE Mar 4, 2024
31e4645
reupload all changed files in src/block -> 2
pandaaaBE Mar 4, 2024
84025b6
reupload changed files in src/item
pandaaaBE Mar 4, 2024
906f0ef
reupload changed files from src/data/bedrock/block/convert
pandaaaBE Mar 4, 2024
d6e59b9
add NetherSprouts shears logic, cs in fungus and netherrack
pandaaaBE Mar 4, 2024
16edcf9
cs in NetherSprouts
pandaaaBE Mar 4, 2024
3c2cfd6
cs
pandaaaBE Mar 17, 2024
e6b03f5
ups?
pandaaaBE Mar 17, 2024
96b977f
stringtoitemparser, removed irrelevant change
pandaaaBE Mar 17, 2024
5c33f05
fix that blocks can not be spawned on non nylium blocks
pandaaaBE Mar 17, 2024
cfb0556
cs
pandaaaBE Mar 17, 2024
4bca81b
replaced world with getWorld()
pandaaaBE Mar 19, 2024
9d2d9f2
replaced world with getWorld() in nylium.php and changed to BlockEven…
pandaaaBE Mar 19, 2024
3916cdf
changed to BlockEventHelper::spread() again lol
pandaaaBE Mar 22, 2024
c3ccf69
try to implement tags (??)
pandaaaBE Mar 22, 2024
7f13147
upsi
pandaaaBE Mar 22, 2024
1efc3ef
replaced world with getWorld()
pandaaaBE Mar 22, 2024
9d603b0
Update VanillaBlocks.php
pandaaaBE Mar 24, 2024
34d5eb5
Update VanillaBlocks.php
pandaaaBE Mar 24, 2024
47f47dc
removed unreleated changes in redmushroom.php
pandaaaBE Mar 24, 2024
920fd68
add soul soil and removed the seed
pandaaaBE Mar 24, 2024
dcde52e
add soul soil to nethersprouts
pandaaaBE Mar 24, 2024
a516584
Delete src/NetherSprouts.php
pandaaaBE Mar 24, 2024
1d6b528
Add files via upload
pandaaaBE Mar 24, 2024
d8d3af3
cs
pandaaaBE Mar 24, 2024
979b554
removed soil sand and changed the order
pandaaaBE Mar 25, 2024
bb96658
ups forgot to upload fungus
pandaaaBE Mar 25, 2024
a92fcf6
reset actual-problems.neon
pandaaaBE Mar 26, 2024
ae5dc50
last try
pandaaaBE Mar 26, 2024
e59fa7d
i hate my life
pandaaaBE Mar 26, 2024
f21f6ad
regenerated actual-problems.neon
pandaaaBE Mar 26, 2024
13818a0
removed random class, used $world var and some changes in vanillablocks
pandaaaBE Mar 30, 2024
eb4cb4e
cs
pandaaaBE Mar 30, 2024
a339a9c
BlockStateData: add a note about CURRENT_VERSION
dktapps Jul 12, 2024
ec25584
Bump shivammathur/setup-php from 2.30.4 to 2.31.1
dependabot[bot] Jul 12, 2024
f4c8b9d
dependabot: group patch updates into a single PR
dktapps Jul 12, 2024
c3bc3d9
dependabot: group PHPStan dependency updates always
dktapps Jul 12, 2024
af2c557
Bump the phpstan group with 2 updates (#6401)
dependabot[bot] Jul 12, 2024
9d64143
Bump docker/build-push-action from 5.3.0 to 6.3.0 (#6387)
dependabot[bot] Jul 14, 2024
c2c9927
BedrockWorldData: Update version constants to 1.21.2 (#6399)
Gaprix Jul 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ updates:
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
groups:
production-patch-updates:
dependency-type: production
patterns:
- "*"
update-types:
- "patch"
development-patch-updates:
dependency-type: development
patterns:
- "*"
update-types:
- "patch"
phpstan:
patterns:
- "phpstan/*"

- package-ecosystem: gitsubmodule
directory: "/"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT

- name: Build image for tag
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.3.0
with:
push: true
context: ./pocketmine-mp
Expand All @@ -66,7 +66,7 @@ jobs:

- name: Build image for major tag
if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.3.0
with:
push: true
context: ./pocketmine-mp
Expand All @@ -79,7 +79,7 @@ jobs:

- name: Build image for minor tag
if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.3.0
with:
push: true
context: ./pocketmine-mp
Expand All @@ -92,7 +92,7 @@ jobs:

- name: Build image for latest tag
if: steps.channel.outputs.CHANNEL == 'stable'
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.3.0
with:
push: true
context: ./pocketmine-mp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/discord-release-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup PHP and tools
uses: shivammathur/setup-php@2.30.4
uses: shivammathur/setup-php@2.31.1
with:
php-version: 8.2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
submodules: true

- name: Setup PHP
uses: shivammathur/setup-php@2.30.4
uses: shivammathur/setup-php@2.31.1
with:
php-version: ${{ matrix.php-version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup PHP and tools
uses: shivammathur/setup-php@2.30.4
uses: shivammathur/setup-php@2.31.1
with:
php-version: 8.2
tools: php-cs-fixer:3.49
Expand Down
2 changes: 1 addition & 1 deletion build/php
Submodule php updated from 084822 to 6f619b
28 changes: 14 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/block/BlockTypeTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ final class BlockTypeTags{
public const SAND = self::PREFIX . "sand";
public const POTTABLE_PLANTS = self::PREFIX . "pottable";
public const FIRE = self::PREFIX . "fire";
public const NYLIUM = self::PREFIX . "nylium";
}
41 changes: 41 additions & 0 deletions src/block/Fungus.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?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\StaticSupportTrait;
use pocketmine\math\Facing;

class Fungus extends Flowable{
use StaticSupportTrait;

private function canBeSupportedAt(Block $block) : bool{
//TODO: moss
$supportBlock = $block->getSide(Facing::DOWN);
return
$supportBlock->hasTypeTag(BlockTypeTags::DIRT) ||
$supportBlock->hasTypeTag(BlockTypeTags::MUD) ||
$supportBlock->hasTypeTag(BlockTypeTags::NYLIUM) ||
$supportBlock->getTypeId() === BlockTypeIds::SOUL_SOIL;
}
}
41 changes: 41 additions & 0 deletions src/block/NetherSprouts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?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\StaticSupportTrait;
use pocketmine\math\Facing;

class NetherSprouts extends Flowable{
use StaticSupportTrait;

private function canBeSupportedAt(Block $block) : bool{
//TODO: moss
$supportBlock = $block->getSide(Facing::DOWN);
return
$supportBlock->hasTypeTag(BlockTypeTags::DIRT) ||
$supportBlock->hasTypeTag(BlockTypeTags::MUD) ||
$supportBlock->hasTypeTag(BlockTypeTags::NYLIUM) ||
$supportBlock->getTypeId() === BlockTypeIds::SOUL_SOIL;
}
}
32 changes: 32 additions & 0 deletions src/block/Netherrack.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,41 @@

namespace pocketmine\block;

use pocketmine\item\Fertilizer;
use pocketmine\item\Item;
use pocketmine\math\Facing;
use pocketmine\math\Vector3;
use pocketmine\player\Player;

class Netherrack extends Opaque{

public function burnsForever() : bool{
return true;
}

public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
if($this->getSide(Facing::UP)->getTypeId() !== BlockTypeIds::AIR){
return false;
}

if($item instanceof Fertilizer && $this->transformToNylium()){
$item->pop();

return true;
}

return false;
}

private function transformToNylium() : bool{
foreach($this->getHorizontalSides() as $side){
if($side instanceof Nylium){
$this->position->getWorld()->setBlock($this->position, $side);
ShockedPlot7560 marked this conversation as resolved.
Show resolved Hide resolved

return true;
}
}

return false;
}
}
Loading
Loading