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 last interacted slot property in chiseled bookshelf #6440

Merged
merged 4 commits into from
Sep 2, 2024

Conversation

ipad54
Copy link
Contributor

@ipad54 ipad54 commented Sep 1, 2024

Introduction

This PR implements missing last interacted slot property that is used in vanilla worlds for redstone power. Without this PR chiseled bookshelves loaded from vanilla worlds will discard their redstone power level.

Source: https://minecraft.wiki/w/Bedrock_Edition_level_format/Block_entity_format#Chiseled_Bookshelf

Changes

API changes

Added the following methods:

  • ChiseledBookshelf::getLastInteractedSlot() : ?ChiseledBookshelfSlot
  • ChiseledBookshelf::setLastInteractedSlot(?ChiseledBookshelfSlot $lastInteractedSlot) : self

Tests

Since PM doesn't have redstone implemented, I added some debug messages to the chat locally to test this.

Screenshot_20240901_120441
Screenshot_20240901_120339

IvanCraft623
IvanCraft623 previously approved these changes Sep 1, 2024
Copy link
Member

@IvanCraft623 IvanCraft623 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your constribution!

@dktapps dktapps added Category: API Related to the plugin API Category: Gameplay Related to Minecraft gameplay experience Type: Enhancement Contributes features or other improvements to PocketMine-MP labels Sep 1, 2024
@IvanCraft623 IvanCraft623 merged commit 8cb2e57 into pmmp:minor-next Sep 2, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: API Related to the plugin API 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.

3 participants