mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
removed Java
This commit is contained in:
parent
c4b03ce13c
commit
bfe23f5547
2 changed files with 1 additions and 49 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
//TODO remove
|
||||
class Java_String{
|
||||
|
||||
private $value = "", $count = 0, $hash = 0;
|
||||
|
||||
public function __construct($string = false){
|
||||
if($string !== false){
|
||||
$this->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];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue