mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
rewritten how item durability/count is handled on serverside
This commit is contained in:
parent
4880be5452
commit
841e12b9ea
30 changed files with 128 additions and 152 deletions
|
|
@ -26,7 +26,7 @@ class Cow extends Animal{
|
|||
if($e->isPlayer() && $action === InteractPacket::ACTION_HOLD){
|
||||
$slot = $e->player->getHeldItem();
|
||||
if($slot->getID() === BUCKET && $slot->getMetadata() === 0){
|
||||
$e->player->removeItem($slot->getID(), $slot->getMetadata(), 1, true); //remove only 1 bucket
|
||||
$e->player->consumeSingleItem();
|
||||
$e->player->addItem(BUCKET, 1, 1, true);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue