Merge branch 'release/3.1'

This commit is contained in:
Dylan K. Taylor 2018-07-02 16:57:01 +01:00
commit 2252f7498d

View File

@ -847,7 +847,7 @@ class Level implements ChunkManager, Metadatable{
/**
* @param Player[] $target
* @param Block[] $blocks
* @param Vector3[] $blocks
* @param int $flags
* @param bool $optimizeRebuilds
*/
@ -856,8 +856,8 @@ class Level implements ChunkManager, Metadatable{
if($optimizeRebuilds){
$chunks = [];
foreach($blocks as $b){
if($b === null){
continue;
if(!($b instanceof Vector3)){
throw new \TypeError("Expected Vector3 in blocks array, got " . (is_object($b) ? get_class($b) : gettype($b)));
}
$pk = new UpdateBlockPacket();
@ -888,8 +888,8 @@ class Level implements ChunkManager, Metadatable{
}
}else{
foreach($blocks as $b){
if($b === null){
continue;
if(!($b instanceof Vector3)){
throw new \TypeError("Expected Vector3 in blocks array, got " . (is_object($b) ? get_class($b) : gettype($b)));
}
$pk = new UpdateBlockPacket();