mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 19:34:15 +00:00
Fixed level importing
This commit is contained in:
parent
5d6d30ed4e
commit
d61f7b889f
@ -472,7 +472,7 @@ class Player{
|
|||||||
if($w === $data["tile"]){
|
if($w === $data["tile"]){
|
||||||
$this->dataPacket(MC_CONTAINER_SET_SLOT, array(
|
$this->dataPacket(MC_CONTAINER_SET_SLOT, array(
|
||||||
"windowid" => $id,
|
"windowid" => $id,
|
||||||
"slot" => $data["slot"],
|
"slot" => $data["slot"] + (isset($data["offset"]) ? $data["offset"]:0),
|
||||||
"block" => $data["slotdata"]->getID(),
|
"block" => $data["slotdata"]->getID(),
|
||||||
"stack" => $data["slotdata"]->count,
|
"stack" => $data["slotdata"]->count,
|
||||||
"meta" => $data["slotdata"]->getMetadata(),
|
"meta" => $data["slotdata"]->getMetadata(),
|
||||||
@ -1758,6 +1758,7 @@ class Player{
|
|||||||
if($this->server->api->dhandle("player.container.slot", array(
|
if($this->server->api->dhandle("player.container.slot", array(
|
||||||
"tile" => $tile,
|
"tile" => $tile,
|
||||||
"slot" => $data["slot"],
|
"slot" => $data["slot"],
|
||||||
|
"offset" => $offset,
|
||||||
"slotdata" => $slot,
|
"slotdata" => $slot,
|
||||||
"itemdata" => $item,
|
"itemdata" => $item,
|
||||||
"player" => $this,
|
"player" => $this,
|
||||||
|
@ -117,7 +117,7 @@ class Tile extends Position{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tile = $this->getPair();
|
$tile = $this->getPair();
|
||||||
unset($this->data["pairx"], $this->data["pairz"], $ile->data["pairx"], $tile->data["pairz"]);
|
unset($this->data["pairx"], $this->data["pairz"], $tile->data["pairx"], $tile->data["pairz"]);
|
||||||
|
|
||||||
$this->server->api->tile->spawnToAll($this);
|
$this->server->api->tile->spawnToAll($this);
|
||||||
if($tile instanceof Tile){
|
if($tile instanceof Tile){
|
||||||
@ -330,7 +330,8 @@ class Tile extends Position{
|
|||||||
}
|
}
|
||||||
$this->server->api->dhandle("tile.container.slot", array(
|
$this->server->api->dhandle("tile.container.slot", array(
|
||||||
"tile" => $this,
|
"tile" => $this,
|
||||||
"slot" => $s + $offset,
|
"slot" => $s,
|
||||||
|
"offset" => $offset,
|
||||||
"slotdata" => $item,
|
"slotdata" => $item,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user