Cleaned up stone formation code

This commit is contained in:
Adubbz 2016-04-07 09:49:57 +10:00
parent 48935837e1
commit 24a41aefa9

View file

@ -104,14 +104,38 @@ public class BlockBOPStoneFormations extends BlockBOPDecoration implements IBOPB
FormationPosition position; FormationPosition position;
position = FormationPosition.STALAGMITE_SMALL; position = FormationPosition.STALAGMITE_SMALL;
if (groundAbove && groundBelow && !formationAbove && !formationBelow) {position = FormationPosition.STAL_SINGLE;} if (groundAbove && !formationAbove)
if (!groundAbove && !groundBelow && formationAbove && formationBelow) {position = FormationPosition.STAL_CONNECTOR;} {
if (!groundAbove && groundBelow && !formationAbove && !formationBelow) {position = FormationPosition.STALAGMITE_SMALL;} if (groundBelow && !formationBelow)
if (!groundAbove && groundBelow && formationAbove && !formationBelow) {position = FormationPosition.STALAGMITE_MEDIUM;} {
if (groundAbove && !groundBelow && !formationAbove && !formationBelow) {position = FormationPosition.STALACTITE_SMALL;} position = FormationPosition.STAL_SINGLE;
if (groundAbove && !groundBelow && !formationAbove && formationBelow) {position = FormationPosition.STALACTITE_MEDIUM;} }
if (!groundAbove && !groundBelow && !formationAbove && formationBelow) {position = FormationPosition.STALAGMITE_TOP;} else if (!groundBelow)
if (!groundAbove && !groundBelow && formationAbove && !formationBelow) {position = FormationPosition.STALACTITE_BOTTOM;} {
if (formationBelow) position = FormationPosition.STALACTITE_MEDIUM;
else position = FormationPosition.STALACTITE_SMALL;
}
}
else if (!groundAbove)
{
if (!groundBelow)
{
if (formationAbove)
{
if (formationBelow) {position = FormationPosition.STAL_CONNECTOR;}
else {position = FormationPosition.STALACTITE_BOTTOM;}
}
else if (formationBelow)
{
position = FormationPosition.STALAGMITE_TOP;
}
}
else
{
if (!formationAbove && !formationBelow) {position = FormationPosition.STALAGMITE_SMALL;}
else if (formationAbove && !formationBelow) {position = FormationPosition.STALAGMITE_MEDIUM;}
}
}
return state.withProperty(POSITION, position); return state.withProperty(POSITION, position);
} }