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

Hoppers don't drop their content when broken #5340

Open
AirOne01 opened this issue Nov 22, 2021 · 10 comments
Open

Hoppers don't drop their content when broken #5340

AirOne01 opened this issue Nov 22, 2021 · 10 comments

Comments

@AirOne01
Copy link
Contributor

Client version: 1.12.2
Server OS: Manjaro Linux
Cuberite Commit id: 95bc2ea

Expected behavior

When breaking a block with storage, it will drop its content to the floor.

Actual behavior

Hoppers will not drop their content when broken.

Steps to reproduce the behavior

Break a hopper with items inside.

@AirOne01 AirOne01 changed the title Droppers don't drop their content when broken Hoppers don't drop their content when broken Nov 22, 2021
@tigerw
Copy link
Member

tigerw commented Nov 23, 2021

Is this in creative or survival?

@AirOne01
Copy link
Contributor Author

In creative mode only.

@tigerw
Copy link
Member

tigerw commented Nov 23, 2021

Block entities not dropping contents on creative was intended :)

@AirOne01
Copy link
Contributor Author

Block entities not dropping contents on creative was intended :)

Intended ? Like is this how it's supposed to be in Cuberite? Because this si not notchian.
If Cuberite is taking different approaches than the vanilla behaviour on some aspect, could you tell me how I can be informed of those, to avoid making useless pull requests?

@Titaniumtown
Copy link

When did you make a pull request?

@AirOne01
Copy link
Contributor Author

AirOne01 commented Nov 25, 2021

I meant issue.
But the point is, what do you mean by intended?

@bearbin
Copy link
Member

bearbin commented Nov 25, 2021

We could do with a page in the users manual listing the deliberate differences between Cuberite and vanilla... But for now there's no harm in opening an issue - nothing wrong with discussion and getting institutional knowledge written down.

@AirOne01
Copy link
Contributor Author

Alright! I guess this kind of decisions is for the active Members to handle. Closing this since it was intended.

@tigerw
Copy link
Member

tigerw commented Nov 27, 2021

cuberite/src/ClientHandle.cpp

Lines 1394 to 1401 in d49ce75

if (m_Player->IsGameModeSurvival())
{
World->DropBlockAsPickups(absPos, m_Player, &m_Player->GetEquippedItem());
}
else
{
World->DigBlock(absPos, m_Player);
}

The code treats getting pickups from blocks and block entities the same; this was intentional for neatness but explains the behaviour. A divergence from Vanilla is a bug, a PR to fix should never be a waste of time. In this case pushing the decision of whether to drop (based on gamemode) into DropBlockAsPickups could work well.

@AirOne01
Copy link
Contributor Author

AirOne01 commented May 1, 2023

Not sure why I didn't reopen this when I saw your comment. Reopened now.

@AirOne01 AirOne01 reopened this May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants