mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Possible fix for #1661
This commit is contained in:
@ -43,7 +43,7 @@ class Chest extends Spawnable implements InventoryHolder, Container{
|
||||
protected $doubleInventory = null;
|
||||
|
||||
public function __construct(FullChunk $chunk, Compound $nbt){
|
||||
$nbt["id"] = Tile::CHEST;
|
||||
$nbt->id = new String("id", Tile::CHEST);
|
||||
parent::__construct($chunk, $nbt);
|
||||
$this->inventory = new ChestInventory($this);
|
||||
|
||||
|
@ -32,6 +32,7 @@ use pocketmine\nbt\tag\Byte;
|
||||
use pocketmine\nbt\tag\Compound;
|
||||
use pocketmine\nbt\tag\Enum;
|
||||
use pocketmine\nbt\tag\Short;
|
||||
use pocketmine\nbt\tag\String;
|
||||
use pocketmine\network\protocol\ContainerSetDataPacket;
|
||||
|
||||
class Furnace extends Tile implements InventoryHolder, Container{
|
||||
@ -39,7 +40,7 @@ class Furnace extends Tile implements InventoryHolder, Container{
|
||||
protected $inventory;
|
||||
|
||||
public function __construct(FullChunk $chunk, Compound $nbt){
|
||||
$nbt["id"] = Tile::FURNACE;
|
||||
$nbt->id = new String("id", Tile::FURNACE);
|
||||
parent::__construct($chunk, $nbt);
|
||||
$this->inventory = new FurnaceInventory($this);
|
||||
|
||||
|
@ -29,7 +29,7 @@ use pocketmine\nbt\tag\String;
|
||||
class Sign extends Spawnable{
|
||||
|
||||
public function __construct(FullChunk $chunk, Compound $nbt){
|
||||
$nbt["id"] = Tile::SIGN;
|
||||
$nbt->id = new String("id", Tile::SIGN);
|
||||
if(!isset($nbt->Text1)){
|
||||
$nbt->Text1 = new String("Text1", "");
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ use pocketmine\level\format\FullChunk;
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\level\Position;
|
||||
use pocketmine\nbt\tag\Compound;
|
||||
use pocketmine\nbt\tag\Int;
|
||||
|
||||
abstract class Tile extends Position{
|
||||
const SIGN = "Sign";
|
||||
@ -88,9 +89,9 @@ abstract class Tile extends Position{
|
||||
}
|
||||
|
||||
public function saveNBT(){
|
||||
$this->namedtag["x"] = $this->x;
|
||||
$this->namedtag["y"] = $this->y;
|
||||
$this->namedtag["z"] = $this->z;
|
||||
$this->namedtag->x = new Int("x", $this->x);
|
||||
$this->namedtag->y = new Int("y", $this->y);
|
||||
$this->namedtag->z = new Int("z", $this->z);
|
||||
}
|
||||
|
||||
public function onUpdate(){
|
||||
|
Reference in New Issue
Block a user