From c798a33363ca9ad4a3cd6157e3805da1441eb2fe Mon Sep 17 00:00:00 2001 From: InusualZ Date: Mon, 25 Nov 2013 18:53:02 -0500 Subject: [PATCH] Fixed gh#332 Crafting with buckets (milk) returns the bucket --- src/Player.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Player.php b/src/Player.php index c11f0cadc..58b792a7c 100644 --- a/src/Player.php +++ b/src/Player.php @@ -842,8 +842,11 @@ class Player{ AchievementAPI::grantAchievement($this, "diamond"); break; case CAKE: - for($i; $i <= 2; $i++){ - $this->addItem(BUCKET, 0, 1, false); + if($this->hasSpace(AIR, 0, 3) == true){ + $this->addItem(BUCKET, 0, 3, false); + } + else{ + $this->server->api->entity->drop(new Position($this->entity->x - 0.5, $this->entity->y, $this->entity->z - 0.5, $this->level), BlockAPI::getItem(BUCKET, 0, 3)); } break;