Heap of bugfixes, cleanup and PHP 7 upgrades

This commit is contained in:
Dylan K. Taylor
2017-07-13 19:18:56 +01:00
parent c2a7c2c6cd
commit 2a7b736f18
49 changed files with 114 additions and 148 deletions

View File

@ -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);