mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-16 08:25:29 +00:00
Remove useless typecasts
This commit is contained in:
parent
d26fcf7dee
commit
da3742b39e
@ -76,7 +76,7 @@ class EffectCommand extends VanillaCommand{
|
||||
}
|
||||
|
||||
if($effect === null){
|
||||
$sender->sendMessage(new TranslationContainer(TextFormat::RED . "%commands.effect.notFound", [(string) $args[1]]));
|
||||
$sender->sendMessage(new TranslationContainer(TextFormat::RED . "%commands.effect.notFound", [$args[1]]));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -83,8 +83,8 @@ class Painting extends Entity{
|
||||
$this->namedtag->setInt("TileY", (int) $this->blockIn->y);
|
||||
$this->namedtag->setInt("TileZ", (int) $this->blockIn->z);
|
||||
|
||||
$this->namedtag->setByte("Facing", (int) $this->direction);
|
||||
$this->namedtag->setByte("Direction", (int) $this->direction); //Save both for full compatibility
|
||||
$this->namedtag->setByte("Facing", $this->direction);
|
||||
$this->namedtag->setByte("Direction", $this->direction); //Save both for full compatibility
|
||||
|
||||
$this->namedtag->setString("Motive", $this->motive);
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ class Explosion{
|
||||
$currentChunk = null;
|
||||
$currentSubChunk = null;
|
||||
|
||||
$mRays = (int) ($this->rays - 1);
|
||||
$mRays = $this->rays - 1;
|
||||
for($i = 0; $i < $this->rays; ++$i){
|
||||
for($j = 0; $j < $this->rays; ++$j){
|
||||
for($k = 0; $k < $this->rays; ++$k){
|
||||
|
@ -134,9 +134,9 @@ class Flat extends Generator{
|
||||
|
||||
protected function parsePreset() : void{
|
||||
$preset = explode(";", $this->preset);
|
||||
$blocks = (string) ($preset[1] ?? "");
|
||||
$blocks = $preset[1] ?? "";
|
||||
$this->biome = (int) ($preset[2] ?? 1);
|
||||
$options = (string) ($preset[3] ?? "");
|
||||
$options = $preset[3] ?? "";
|
||||
$this->structure = self::parseLayers($blocks);
|
||||
|
||||
$this->floorLevel = count($this->structure);
|
||||
|
@ -535,7 +535,7 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
}
|
||||
|
||||
public function getByteRotation() : float{
|
||||
return (float) ($this->getByte() * (360 / 256));
|
||||
return ($this->getByte() * (360 / 256));
|
||||
}
|
||||
|
||||
public function putByteRotation(float $rotation) : void{
|
||||
|
Loading…
x
Reference in New Issue
Block a user