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

Added endPortalPick setting #722

Merged
merged 3 commits into from
Sep 23, 2023
Merged

Added endPortalPick setting #722

merged 3 commits into from
Sep 23, 2023

Conversation

sh0inx
Copy link
Contributor

@sh0inx sh0inx commented Aug 5, 2023

  • added endPortalPick configuration setting to allow the end portal frames to be picked up and placed again, as they are indestructable blocks (right click with wooden pickaxe, consumes pickaxe)
  • restructured PlayerInteractListener to accommodate multiple listening targets

- added endPortalPick configuration setting to allow the end portal frames to be picked up and placed again, as they are indestructable blocks (right click with wooden pickaxe, consumes pickaxe)
- restructured PlayerInteractListener to accommodate multiple listening targets
@sh0inx sh0inx linked an issue Aug 5, 2023 that may be closed by this pull request
&& event.getClickedBlock().getType().equals(Material.END_PORTAL_FRAME)
&& itemInHand.getType().equals(Material.WOODEN_PICKAXE)) {

event.getClickedBlock().setType(Material.AIR);
Copy link
Member

Choose a reason for hiding this comment

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

Have you verified if this also breaks the portal if activated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have not, I'll test today

Comment on lines 57 to 61
event.getClickedBlock().getDrops().add(new ItemStack(Material.END_PORTAL_FRAME));
event.getClickedBlock().breakNaturally();

player.getInventory().addItem(new ItemStack(Material.END_PORTAL_FRAME)).values().forEach(itemStack ->
player.getWorld().dropItem(player.getLocation(), itemStack));
Copy link
Member

Choose a reason for hiding this comment

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

Why are we adding this to the drops and the player's inventory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great question

Copy link
Contributor Author

Choose a reason for hiding this comment

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

adding to the drops doesn't do anything, i'll remove that line

@PeachesMLG PeachesMLG merged commit 0afae52 into master Sep 23, 2023
4 of 5 checks passed
@PeachesMLG PeachesMLG deleted the 713-endportal-recollection branch September 23, 2023 17:06
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

Successfully merging this pull request may close these issues.

Allow players to get/break an end portal frame by shift clicking on it
2 participants