Merge remote-tracking branch 'origin/release/3.2'

This commit is contained in:
Dylan K. Taylor 2018-08-19 19:54:34 +01:00
commit ac8565fc2e

View File

@ -191,6 +191,9 @@ abstract class Tile extends Position{
* @return CompoundTag * @return CompoundTag
*/ */
public static function createNBT(Vector3 $pos, ?int $face = null, ?Item $item = null, ?Player $player = null) : CompoundTag{ public static function createNBT(Vector3 $pos, ?int $face = null, ?Item $item = null, ?Player $player = null) : CompoundTag{
if(static::class === self::class){
throw new \BadMethodCallException(__METHOD__ . " must be called from the scope of a child class");
}
$nbt = new CompoundTag("", [ $nbt = new CompoundTag("", [
new StringTag(self::TAG_ID, static::getSaveId()), new StringTag(self::TAG_ID, static::getSaveId()),
new IntTag(self::TAG_X, (int) $pos->x), new IntTag(self::TAG_X, (int) $pos->x),