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

View File

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