mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Heap of bugfixes, cleanup and PHP 7 upgrades
This commit is contained in:
@ -203,17 +203,17 @@ class ParticleCommand extends VanillaCommand{
|
||||
|
||||
}
|
||||
|
||||
if(substr($name, 0, 10) === "iconcrack_"){
|
||||
if(strpos($name, "iconcrack_") === 0){
|
||||
$d = explode("_", $name);
|
||||
if(count($d) === 3){
|
||||
return new ItemBreakParticle($pos, Item::get((int) $d[1], (int) $d[2]));
|
||||
}
|
||||
}elseif(substr($name, 0, 11) === "blockcrack_"){
|
||||
}elseif(strpos($name, "blockcrack_") === 0){
|
||||
$d = explode("_", $name);
|
||||
if(count($d) === 2){
|
||||
return new TerrainParticle($pos, Block::get($d[1] & 0xff, $d[1] >> 12));
|
||||
}
|
||||
}elseif(substr($name, 0, 10) === "blockdust_"){
|
||||
}elseif(strpos($name, "blockdust_") === 0){
|
||||
$d = explode("_", $name);
|
||||
if(count($d) >= 4){
|
||||
return new DustParticle($pos, $d[1] & 0xff, $d[2] & 0xff, $d[3] & 0xff, isset($d[4]) ? $d[4] & 0xff : 255);
|
||||
|
Reference in New Issue
Block a user