int i = MathHelper.floor_double( this.posY );
int k = MathHelper.floor_double( this.posZ );
Block blk = worldObj.getBlock( j, i, k );
Material mat = blk.getMaterial();
IGrowableCrystal cry = (IGrowableCrystal) is.getItem();
float multiplier = cry.getMultiplier( blk, mat );
int speed = (int) Math.max( 1, getSpeed( j, i, k ) * multiplier );
boolean isClient = Platform.isClient();
if ( mat.isLiquid() )
{
if ( isClient )
progress_1000++;
else
progress_1000 += speed;
}
else
progress_1000 = 0;
if ( isClient )
{
int len = 40;
if ( speed > 2 )
len = 20;
if ( speed > 90 )
len = 15;
if ( speed > 150 )
len = 10;
if ( speed > 240 )
len = 7;
if ( speed > 360 )
len = 3;
if ( speed > 500 )
len = 1;
if ( progress_1000 >= len )
{
progress_1000 = 0;
CommonHelper.proxy.spawnEffect( EffectType.Vibrant, worldObj, posX, posY + 0.2, posZ, null );
}
}
else
{
if ( progress_1000 > 1000 )
{
progress_1000 -= 1000;
setEntityItemStack( cry.triggerGrowth( is ) );
}
}
}
}