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 transfer functionality for hoppers #5906

Draft
wants to merge 93 commits into
base: minor-next
Choose a base branch
from

Conversation

CoderJoeW
Copy link

Introduction

This pull request solves the following issue

https://github.com/pmmp/PocketMine-MP/projects/14#card-67670591

Follow-up

Normally when a hopper is powered it locks the hopper. Due to redstone and powering functionality not currently being implemented I saw no need to implement this in the hopper(yet)

@ShockedPlot7560
Copy link
Member

There's already an open PR on the subject: #5869

@jasonw4331 jasonw4331 added Category: Gameplay Related to Minecraft gameplay experience Type: Enhancement Contributes features or other improvements to PocketMine-MP labels Jul 17, 2023
@CoderJoeW
Copy link
Author

@ShockedPlot7560 I have looked over the original pull request and it has some issues

  1. The code does not seem to handle input properly(when hopper is on top of furnance) it will throw anything into the input
  2. The code has this long if/elseif/else statement

I think I could maybe build a better implementation at least I would like the chance to try to build a better implementation

@ShockedPlot7560
Copy link
Member

As mentioned in the other PR, transfer logics should be located in the blocks directly, to allow greater flexibility, or at least be externalized from the hopper class itself : #5869 (comment)

This PR also seems incomplete, as it lacks the logic to retrieve items / check entities.

If it's in progress, convert it into a draft so you can tell when it's ready for review.

@CoderJoeW
Copy link
Author

@ShockedPlot7560 How do I convert it into a draft?

@ColinHDev
Copy link
Contributor

@ShockedPlot7560 I have looked over the original pull request and it has some issues

  1. The code does not seem to handle input properly(when hopper is on top of furnance) it will throw anything into the input
  2. The code has this long if/elseif/else statement

I think I could maybe build a better implementation at least I would like the chance to try to build a better implementation

It does handle the input properly, as you can see in the wiki: A working hopper pointing into top of a furnace deposits only into the ingredient slot. It can push any item, including items that can't be smelted by the furnace.

@CoderJoeW
Copy link
Author

@ColinHDev I didnt know that. Its weird thats how it is supposed to work in vanilla mc

@CoderJoeW
Copy link
Author

Perhaps this is better off being closed then as I clearly do not know as much as I need to know for this implementation

src/block/Furnace.php Show resolved Hide resolved
src/block/Furnace.php Show resolved Hide resolved
src/block/Furnace.php Outdated Show resolved Hide resolved
@ShockedPlot7560
Copy link
Member

#5906 (comment)

Still seems relevant

@ShockedPlot7560
Copy link
Member

#5906 (comment)

Still seems relevant

For your information, this PR is waiting for this comment.

@CoderJoeW
Copy link
Author

If someone wants to takeover and finish this would be great I am busy atm to finish

@ShockedPlot7560
Copy link
Member

If someone wants to takeover and finish this would be great I am busy atm to finish

You haven't authorized the maintaner to push on your branch. I've taken over the PR locally, but I can't update your branch because of this permission problem.

See here for the solution

@CoderJoeW
Copy link
Author

@ShockedPlot7560 Couldnt figure out how to enable access from the link so I just sent you an invite to the project as a maintainer. I believe that should let you edit it

@ShockedPlot7560
Copy link
Member

@ShockedPlot7560 Couldnt figure out how to enable access from the link so I just sent you an invite to the project as a maintainer. I believe that should let you edit it

For your knowledge, just go to your PR on the right there's a checkbox on PC, or at the very bottom for a mobile. For your futures PR, you can do this directly when you create them (it should be checked by default).

I'll look into it, thanks

@ShockedPlot7560
Copy link
Member

Storage in the cooldown tile and retrieval will be missing.

The only question I have is that in the wiki, a cooldown for the recovery of entities is indicated, but only the transfer of items is present in the tile. Something to think about.

Joshy3282 added a commit to Joshy3282/PocketMine-MP that referenced this pull request Oct 2, 2024
@dktapps dktapps added Status: Incomplete Work in progress and removed Status: Waiting on Author Status: Incomplete Work in progress labels Nov 24, 2024
@dktapps dktapps marked this pull request as draft November 24, 2024 13:05
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 Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants