mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +00:00
Fixed item drop megaduplication
This commit is contained in:
parent
38eed99789
commit
8d9f9ed9ed
1 changed files with 3 additions and 3 deletions
|
|
@ -136,14 +136,14 @@ class BlockAPI{
|
||||||
if($down[0] === 64){
|
if($down[0] === 64){
|
||||||
$data2 = $data;
|
$data2 = $data;
|
||||||
--$data2["y"];
|
--$data2["y"];
|
||||||
$this->server->handle("player.block.break", $data2);
|
$this->server->event("player.block.break", $data2);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$up = $this->server->api->level->getBlock($data["x"], $data["y"] + 1, $data["z"]);
|
$up = $this->server->api->level->getBlock($data["x"], $data["y"] + 1, $data["z"]);
|
||||||
if($up[0] === 64){
|
if($up[0] === 64){
|
||||||
$data2 = $data;
|
$data2 = $data;
|
||||||
++$data2["y"];
|
++$data2["y"];
|
||||||
$this->server->handle("player.block.break", $data2);
|
$this->server->event("player.block.break", $data2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -151,7 +151,7 @@ class BlockAPI{
|
||||||
if($drop !== false and $drop[0] !== 0 and $drop[2] > 0){
|
if($drop !== false and $drop[0] !== 0 and $drop[2] > 0){
|
||||||
$this->drop($data["x"], $data["y"], $data["z"], $drop[0], $drop[1] & 0x0F, $drop[2] & 0xFF);
|
$this->drop($data["x"], $data["y"], $data["z"], $drop[0], $drop[1] & 0x0F, $drop[2] & 0xFF);
|
||||||
}
|
}
|
||||||
$this->server->handle("player.block.break", $data);
|
$this->server->event("player.block.break", $data);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue