From bfe23f5547ebeb7bddf13a7f3ce6d032d52b32fb Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sun, 10 Dec 2023 00:13:10 +0300 Subject: [PATCH] removed Java --- src/entity/Entity.php | 2 +- src/utils/Java.php | 48 ------------------------------------------- 2 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 src/utils/Java.php diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 9a2eb1e5..e30e6cf5 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -429,7 +429,7 @@ class Entity extends Position $blockY = floor($this->y + $this->getEyeHeight() + $y); $blockZ = floor($this->z + $z); - if($this->level->getBlockWithoutVector($blockX, $blockY, $blockZ)->isSolid){ + if(StaticBlock::getIsSolid($this->level->level->getBlockID($blockX, $blockY, $blockZ))){ $this->harm(1, "suffocation"); // Suffocation $hasUpdate = true; break; diff --git a/src/utils/Java.php b/src/utils/Java.php deleted file mode 100644 index 267cb030..00000000 --- a/src/utils/Java.php +++ /dev/null @@ -1,48 +0,0 @@ -value = (string) $string; - $this->count = strlen($this->value); - } - } - - public function __toString(){ - return $this->value; - } - - public function lenght(){ - return $this->count; - } - - public function isEmpty(){ - return $this->count === 0; - } - - public function hashCode(){ - $h = $this->hash; - if($h === 0 and $this->count > 0){ - for($i = 0; $i < $this->count; ++$i){ - $h = (($h << 5) - $h) + ord($this->charAt($i)); - $h = $h & 0xFFFFFFFF; - $this->hash = $h; - } - $this->hash = $h; - } - return $h; - } - - public function charAt($index){ - $index = (int) $index; - if($index < 0 or $index >= $this->count){ - trigger_error("Undefined offset $index", E_USER_WARNING); - return false; - } - return $this->value[$index]; - } -} \ No newline at end of file