Removed extra AxisAlignedBB generation on Door and Trapdoor

This commit is contained in:
Shoghi Cervantes 2014-10-30 22:15:19 +01:00
parent f66944368d
commit 8f0527832f
2 changed files with 16 additions and 18 deletions

View File

@ -73,7 +73,7 @@ abstract class Door extends Transparent{
if($j === 0){
if($flag){
if(!$flag1){
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z,
@ -82,7 +82,7 @@ abstract class Door extends Transparent{
$this->z + $f
);
}else{
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z + 1 - $f,
@ -92,7 +92,7 @@ abstract class Door extends Transparent{
);
}
}else{
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z,
@ -104,7 +104,7 @@ abstract class Door extends Transparent{
}elseif($j === 1){
if($flag){
if(!$flag1){
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x + 1 - $f,
$this->y,
$this->z,
@ -113,7 +113,7 @@ abstract class Door extends Transparent{
$this->z + 1
);
}else{
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z,
@ -123,7 +123,7 @@ abstract class Door extends Transparent{
);
}
}else{
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z,
@ -135,7 +135,7 @@ abstract class Door extends Transparent{
}elseif($j === 2){
if($flag){
if(!$flag1){
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z + 1 - $f,
@ -144,7 +144,7 @@ abstract class Door extends Transparent{
$this->z + 1
);
}else{
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z,
@ -154,7 +154,7 @@ abstract class Door extends Transparent{
);
}
}else{
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x + 1 - $f,
$this->y,
$this->z,
@ -166,7 +166,7 @@ abstract class Door extends Transparent{
}elseif($j === 3){
if($flag){
if(!$flag1){
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z,
@ -175,7 +175,7 @@ abstract class Door extends Transparent{
$this->z + 1
);
}else{
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x + 1 - $f,
$this->y,
$this->z,
@ -185,7 +185,7 @@ abstract class Door extends Transparent{
);
}
}else{
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z + 1 - $f,

View File

@ -43,8 +43,6 @@ class Trapdoor extends Transparent{
$f = 0.1875;
$bb = null;
if(($damage & 0x08) > 0){
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$this->x,
@ -67,7 +65,7 @@ class Trapdoor extends Transparent{
if(($damage & 0x04) > 0){
if(($damage & 0x03) === 0){
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z + 1 - $f,
@ -76,7 +74,7 @@ class Trapdoor extends Transparent{
$this->z + 1
);
}elseif(($damage & 0x03) === 1){
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z,
@ -85,7 +83,7 @@ class Trapdoor extends Transparent{
$this->z + $f
);
}if(($damage & 0x03) === 2){
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x + 1 - $f,
$this->y,
$this->z,
@ -94,7 +92,7 @@ class Trapdoor extends Transparent{
$this->z + 1
);
}if(($damage & 0x03) === 3){
$bb = AxisAlignedBB::getBoundingBoxFromPool(
$bb->setBounds(
$this->x,
$this->y,
$this->z,