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

canPlaceOn, canDestroy have no effect on clients #6460

Open
Nerahikada opened this issue Sep 26, 2024 · 0 comments · May be fixed by #6461
Open

canPlaceOn, canDestroy have no effect on clients #6460

Nerahikada opened this issue Sep 26, 2024 · 0 comments · May be fixed by #6461
Labels
Category: API Related to the plugin API Category: Gameplay Related to Minecraft gameplay experience Category: Protocol Related to (changes in) the Minecraft network protocol Status: Debugged Cause of the bug has been found, but not fixed

Comments

@Nerahikada
Copy link
Contributor

Issue description

  • Expected result: Using Item::setCanPlaceOn(), Item::setCanDestroy() should be able to change the item's behavior
  • Actual result: These changes are not reflected on the client and nothing happens

This issue is caused by this code:

new ItemStackExtraData($nbt, canPlaceOn: [], canDestroy: []);

Steps to reproduce the issue

  1. Create an item and give it to the player
$item = VanillaItems::IRON_HOE();
$item->setCanDestroy(["minecraft:grass_block"]);
$player->getInventory()->addItem($item);

OS and versions

  • PocketMine-MP: 5.19.0
@Nerahikada Nerahikada linked a pull request Sep 26, 2024 that will close this issue
4 tasks
@jasonw4331 jasonw4331 added Category: API Related to the plugin API Category: Gameplay Related to Minecraft gameplay experience Status: Debugged Cause of the bug has been found, but not fixed Category: Protocol Related to (changes in) the Minecraft network protocol labels Nov 4, 2024
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 Category: Protocol Related to (changes in) the Minecraft network protocol Status: Debugged Cause of the bug has been found, but not fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants