Fix bounding box positioning on BOP plants
This commit is contained in:
parent
6a1347ff6f
commit
bf130cbe9c
1 changed files with 9 additions and 13 deletions
|
@ -326,35 +326,31 @@ public class BlockBOPPlant extends BlockDecoration implements IShearable
|
||||||
switch ((BOPPlants) state.getValue(this.variantProperty))
|
switch ((BOPPlants) state.getValue(this.variantProperty))
|
||||||
{
|
{
|
||||||
case CLOVERPATCH: case LEAFPILE: case DEADLEAFPILE:
|
case CLOVERPATCH: case LEAFPILE: case DEADLEAFPILE:
|
||||||
this.setBlockBoundsByRadiusAndHeight(0.5F, 0.015625F);
|
this.setBlockBoundsByRadiusAndHeightWithXZOffset(0.5F, 0.015625F, pos);
|
||||||
break;
|
break;
|
||||||
case SHORTGRASS:
|
case SHORTGRASS:
|
||||||
this.setBlockBounds(0.1F, 0F, 0.1F, 0.9F, 0.25F, 0.9F);
|
this.setBlockBoundsByRadiusAndHeightWithXZOffset(0.4F, 0.25F, pos);
|
||||||
break;
|
break;
|
||||||
case MEDIUMGRASS:
|
case MEDIUMGRASS:
|
||||||
this.setBlockBounds(0.1F, 0F, 0.1F, 0.9F, 0.6F, 0.9F);
|
this.setBlockBoundsByRadiusAndHeightWithXZOffset(0.4F, 0.6F, pos);
|
||||||
break;
|
break;
|
||||||
case CATTAIL:
|
case CATTAIL:
|
||||||
this.setBlockBoundsByRadiusAndHeight(0.375F, 1.0F);
|
this.setBlockBoundsByRadiusAndHeightWithXZOffset(0.375F, 1.0F, pos);
|
||||||
break;
|
break;
|
||||||
case TINYCACTUS:
|
case TINYCACTUS:
|
||||||
// TODO: what on earth is this madness? Does it just cause some random scattering?
|
this.setBlockBoundsByRadiusAndHeightWithXZOffset(0.3F, 0.7F, pos);
|
||||||
long i1 = pos.getX() * 3129871 ^ pos.getZ() * 116129781L ^ pos.getY();
|
|
||||||
i1 = i1 * i1 * 42317861L + i1 * 11L;
|
|
||||||
float d0 = (float)(((i1 >> 16 & 15L) / 15.0F - 0.5D) * 0.5D);
|
|
||||||
float d2 = (float)(((i1 >> 24 & 15L) / 15.0F - 0.5D) * 0.5D);
|
|
||||||
this.setBlockBounds(0.3F + d0, 0.0F, 0.3F + d2, 0.7F + d0, 0.4F, 0.7F + d2);
|
|
||||||
break;
|
break;
|
||||||
case ROOT:
|
case ROOT:
|
||||||
// roots hang from ceiling
|
// roots hang from ceiling
|
||||||
this.setBlockBoundsByRadiusAndHeight(0.4F, 0.8F, true);
|
this.setBlockBoundsByRadiusAndHeightWithXZOffset(0.4F, 0.8F, true, pos);
|
||||||
break;
|
break;
|
||||||
case REED:
|
case REED:
|
||||||
// reeds extend one block below
|
// reeds extend one block below
|
||||||
this.setBlockBounds(0.2F, -1.0F, 0.2F, 0.8F, 0.8F, 0.8F);
|
this.setBlockBoundsByRadiusAndHeightWithXZOffset(0.3F, 0.8F, pos);
|
||||||
|
this.minY = -1.0D;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.setBlockBoundsByRadiusAndHeight(0.4F, 0.8F);
|
this.setBlockBoundsByRadiusAndHeightWithXZOffset(0.4F, 0.8F, pos);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue