mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
rewrite of interact system, bugfixes, ai tweaks
This commit is contained in:
parent
f5222be9d2
commit
ac1a1b2449
62 changed files with 649 additions and 491 deletions
|
|
@ -41,7 +41,7 @@ class Level{
|
|||
$x0 = floor($aABB->minX);
|
||||
$x1 = ceil($aABB->maxX);
|
||||
$y0 = floor($aABB->minY);
|
||||
$y1 = ceil($aABB->maxY);
|
||||
$y1 = round($aABB->maxY);
|
||||
$z0 = floor($aABB->minZ);
|
||||
$z1 = ceil($aABB->maxZ);
|
||||
$x0 = $x0 < 0 ? 0 : $x0;
|
||||
|
|
@ -51,11 +51,11 @@ class Level{
|
|||
$y1 = $y1 > 128 ? 128 : $y1;
|
||||
$z1 = $z1 > 256 ? 256 : $z1;
|
||||
|
||||
for($x = $x0; $x < $x1; ++$x) {
|
||||
for($x = $x0; $x <= $x1; ++$x) {
|
||||
for($y = $y0; $y < $y1; ++$y) {
|
||||
for($z = $z0; $z < $z1; ++$z) {
|
||||
for($z = $z0; $z <= $z1; ++$z) {
|
||||
$b = $this->getBlockWithoutVector($x, $y, $z);
|
||||
if($b != false && $b->isSolid) {
|
||||
if($b != false && $b->boundingBox->intersectsWith($aABB) && $b->isSolid) {
|
||||
$aABBs[] = $b->boundingBox;
|
||||
}
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ class Level{
|
|||
"id" => $entity->type,
|
||||
"Color" => @$entity->data["Color"],
|
||||
"Sheared" => @$entity->data["Sheared"],
|
||||
"Saddled" => @$entity->data["Saddled"],
|
||||
"State" => @$entity->data["State"],
|
||||
"IsBaby" => @$entity->data["IsBaby"],
|
||||
"Health" => $entity->health,
|
||||
"Pos" => [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue