Fixed Double Chest behavior

This commit is contained in:
Shoghi Cervantes
2014-10-29 12:57:26 +01:00
parent 50cfeaa393
commit afaa2cf722
4 changed files with 46 additions and 9 deletions

View File

@ -62,7 +62,7 @@ class Chest extends Transparent{
3 => 3,
];
$chest = false;
$chest = null;
$this->meta = $faces[$player instanceof Player ? $player->getDirection() : 0];
for($side = 2; $side <= 5; ++$side){
@ -130,11 +130,11 @@ class Chest extends Transparent{
new Int("z", $this->z)
]);
$nbt->Items->setTagType(NBT::TAG_Compound);
$chest = new TileChest($this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), $nbt);
$chest = Tile::createTile("Chest", $this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), $nbt);
}
if(($player->gamemode & 0x01) === 0x01){
if($player->isCreative()){
return true;
}
$player->addWindow($chest->getInventory());