fromArrayGuesser() public static method

public static fromArrayGuesser ( $key, $value )
Beispiel #1
0
 /**
  * Return the defined game rules as NBT.
  */
 public function writeToNBT()
 {
     $compoundarray = [];
     foreach ($this->theGameRules as $key => $value) {
         $compoundarray[] = NBT::fromArrayGuesser($key, $value);
     }
     $nbttagcompound = new CompoundTag("GameRules", $compoundarray);
     return $nbttagcompound;
 }