mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Replaced array() with []
This commit is contained in:
@ -34,50 +34,50 @@ class Painting extends Item{
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if($target->isTransparent === false and $face > 1 and $block->isSolid === false){
|
||||
$faces = array(
|
||||
$faces = [
|
||||
2 => 1,
|
||||
3 => 3,
|
||||
4 => 0,
|
||||
5 => 2,
|
||||
|
||||
);
|
||||
$motives = array(
|
||||
];
|
||||
$motives = [
|
||||
// Motive Width Height
|
||||
array("Kebab", 1, 1),
|
||||
array("Aztec", 1, 1),
|
||||
array("Alban", 1, 1),
|
||||
array("Aztec2", 1, 1),
|
||||
array("Bomb", 1, 1),
|
||||
array("Plant", 1, 1),
|
||||
array("Wasteland", 1, 1),
|
||||
array("Wanderer", 1, 2),
|
||||
array("Graham", 1, 2),
|
||||
array("Pool", 2, 1),
|
||||
array("Courbet", 2, 1),
|
||||
array("Sunset", 2, 1),
|
||||
array("Sea", 2, 1),
|
||||
array("Creebet", 2, 1),
|
||||
array("Match", 2, 2),
|
||||
array("Bust", 2, 2),
|
||||
array("Stage", 2, 2),
|
||||
array("Void", 2, 2),
|
||||
array("SkullAndRoses", 2, 2),
|
||||
["Kebab", 1, 1],
|
||||
["Aztec", 1, 1],
|
||||
["Alban", 1, 1],
|
||||
["Aztec2", 1, 1],
|
||||
["Bomb", 1, 1],
|
||||
["Plant", 1, 1],
|
||||
["Wasteland", 1, 1],
|
||||
["Wanderer", 1, 2],
|
||||
["Graham", 1, 2],
|
||||
["Pool", 2, 1],
|
||||
["Courbet", 2, 1],
|
||||
["Sunset", 2, 1],
|
||||
["Sea", 2, 1],
|
||||
["Creebet", 2, 1],
|
||||
["Match", 2, 2],
|
||||
["Bust", 2, 2],
|
||||
["Stage", 2, 2],
|
||||
["Void", 2, 2],
|
||||
["SkullAndRoses", 2, 2],
|
||||
//array("Wither", 2, 2),
|
||||
array("Fighters", 4, 2),
|
||||
array("Skeleton", 4, 3),
|
||||
array("DonkeyKong", 4, 3),
|
||||
array("Pointer", 4, 4),
|
||||
array("Pigscene", 4, 4),
|
||||
array("Flaming Skull", 4, 4),
|
||||
);
|
||||
["Fighters", 4, 2],
|
||||
["Skeleton", 4, 3],
|
||||
["DonkeyKong", 4, 3],
|
||||
["Pointer", 4, 4],
|
||||
["Pigscene", 4, 4],
|
||||
["Flaming Skull", 4, 4],
|
||||
];
|
||||
$motive = $motives[mt_rand(0, count($motives) - 1)];
|
||||
$data = array(
|
||||
$data = [
|
||||
"x" => $target->x,
|
||||
"y" => $target->y,
|
||||
"z" => $target->z,
|
||||
"yaw" => $faces[$face] * 90,
|
||||
"Motive" => $motive[0],
|
||||
);
|
||||
];
|
||||
//TODO
|
||||
//$e = $server->api->entity->add($level, ENTITY_OBJECT, OBJECT_PAINTING, $data);
|
||||
//$e->spawnToAll();
|
||||
|
Reference in New Issue
Block a user