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

Block: (Walls) implement tall/short connections #6624

Open
wants to merge 3 commits into
base: stable
Choose a base branch
from

Conversation

0x00032
Copy link

@0x00032 0x00032 commented Feb 13, 2025

Related issues & PRs

Behavioural changes

Changed how walls behave with block on top of them.

Tests

Minecraft 2_13_2025 8_09_47 AM
Minecraft 2_13_2025 8_10_02 AM
Minecraft 2_13_2025 8_11_18 AM

@0x00032 0x00032 requested a review from a team as a code owner February 13, 2025 13:23
if($up !== $this->post){
$this->post = $up;
$changed++;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to break things. Post should be set for the ends of walls.

src/block/Wall.php Outdated Show resolved Hide resolved
foreach(Facing::HORIZONTAL as $facing){
$block = $this->getSide($facing);
if($block instanceof static || $block instanceof FenceGate || $block instanceof Thin || $block->getSupportType(Facing::opposite($facing)) === SupportType::FULL){
if(!isset($this->connections[$facing])){
$this->connections[$facing] = WallConnectionType::SHORT;
if($this->getSide(Facing::UP)->getTypeId() == BlockTypeIds::AIR) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if($this->getSide(Facing::UP)->getTypeId() == BlockTypeIds::AIR) {
if($this->getSide(Facing::UP)->getTypeId() === BlockTypeIds::AIR){

I'm also fairly sure the logic for this is more complex than just checking for air.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ill do some more testing but I haven't found any issues yet.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah gonna have to add more logic, this isn't the indented state
Minecraft 2_13_2025 11_34_25 AM

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defiantly issues, will continue testing and implementing more logic for vertical connections

src/block/Wall.php Outdated Show resolved Hide resolved
@dktapps dktapps added Category: Gameplay Related to Minecraft gameplay experience Status: Incomplete Work in progress Type: Enhancement Contributes features or other improvements to PocketMine-MP labels Feb 13, 2025
@b1zeyofficial
Copy link

just a visual test
Снимок экрана 2025-02-14 163308
Снимок экрана 2025-02-14 163004
Снимок экрана 2025-02-14 162945

@0x00032
Copy link
Author

0x00032 commented Feb 14, 2025

Yeah i'm working on it now, i'm implementing the logic from dragonfly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Gameplay Related to Minecraft gameplay experience Status: Incomplete Work in progress Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Walls still follow pre-1.16 rules
3 participants