mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
item physics test
This commit is contained in:
parent
828599184c
commit
3892d697f8
5 changed files with 51 additions and 29 deletions
|
|
@ -36,6 +36,8 @@ class Level{
|
|||
public function close(){
|
||||
$this->__destruct();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param AxisAlignedBB $aABB
|
||||
* @return AxisAlignedBB[]
|
||||
|
|
@ -55,9 +57,9 @@ 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->boundingBox->intersectsWith($aABB) && $b->isSolid) {
|
||||
$aABBs[] = $b->boundingBox;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue